react-intl.macro
react-intl.macro copied to clipboard
FormattedMessage error when using it as a parent component
I am using this approach as outlined in some of the answers in here
<FormattedMessage
....
>
{placeholder => <input placeholder={placeholder} />}
</FormattedMessage>
However, I get this error when trying to extract the message strings
TypeError: react-intl.macro: referencePath.parentPath.get(...).filter is not a function Learn more: https://www.npmjs.com/package/react-intl.macro at Array.map (<anonymous>)
Knock Knock :) I am having the same issue, cannot extract messages when using a render prop pattern. Anyone has any clue how to solve this ?
I have the same issue when I do:
const info = {
name: (
<FormattedMessage
id="app.name"
defaultMessage="Your name"
/>
),
}
I have same issue. Is there anyone resolved this?
Any updates on this?
I solved this problem by combining using defineMessages of react-intl.macro and injectInt of react-int.