Skip to content
Discussion options

You must be logged in to vote

Sure, no worries!

I had a moment to have a look at the implementation from react-intl:

      if (typeof v === 'object') {
        const id = generateToken(i)
        richValues[id] = v as any
        return id
      }

…where generateToken simply creates an id based on the index of elements in case of rich text values.

The spec on the values that formatting functions from ListFormat accept only has this information in regard to the limitation of strings:

NOTE
This algorithm raises exceptions when it encounters values that are not Strings, because there is no obvious locale-aware coercion for arbitrary values.

Based on this, I think we can be a bit more flexible like react-intl does and a…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@nbibler
Comment options

@amannn
Comment options

Answer selected by nbibler
@nbibler
Comment options

@amannn
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants