Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intl.formatList return type is React.ReactNode instead of string #1537

Closed
andrew--r opened this issue Dec 10, 2019 · 0 comments
Closed

intl.formatList return type is React.ReactNode instead of string #1537

andrew--r opened this issue Dec 10, 2019 · 0 comments
Labels

Comments

@andrew--r
Copy link

Expected behavior

Return type of intl.formatList is string, like intl.formatMessage.

Current behavior

Screen Shot 2019-12-10 at 13 23 32

Return type of intl.formatList is React.ReactNode. It makes impossible to use intl.formatList inside intl.formatMessage, for example:

intl.formatMessage(fileTypeErrorMessage, {
  fileTypes: intl.formatList(['txt', 'md'], {type: 'union'})
});

Your Environment

react-intl@3.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant