-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
FormattedMessage render props do not renders component variables #1131
Comments
Hi, This is a duplicate of #513 |
Having the same issue. Text cuts off at the place where the React component variable would've been rendered. No error messages in console. This works:
This does not:
|
+1 Experimenting a bit, it looks like swapping this line for |
react-intl seems to be the de facto standard when it comes to React internationalization. Is it still being actively maintained, @ericf? |
Hi, @edreyyo, please see: #1141 (comment) |
Thanks for the link @papasmile. Much appreciated. |
I think I figured out why the test passes but the bug is valid! The documentation says to use the formatter as @darkowic described in his original post, but the test does it differently. In that case, the argument is a destructured array of nodes. When I switch to that technique, I was able to find a workable solution. It seems like the right solution is to update the documentation. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. |
Hello everyone :)
BUG REPORT
Components variables passed to
FormattedMessage
used as render props are not rendered.Current behavior
Text will be cut off at
variable
:Formatted message variable as a render props:
Expected behavior
Render it correctly
Step to reproduce for BUG REPORT
Here is a reproduction case https://codesandbox.io/s/yp8zjow4kx
Your Environment
npm ls react-intl
npm ls react
npm --version
node --version
The text was updated successfully, but these errors were encountered: