Add useKey support to intl.formatMessage
fsmaia opened this issue · comments
- version: 2.3.0
node
version: 10.16.1npm
(oryarn
) version: 6.9.0
Do you want to request a feature or report a bug?:
Feature
What is the current behavior?:
key
prop is supported only in <FormattedMessage />
and <FormattedHTMLMessage />
when using useKey
option
What is the expected behavior?:
key
property could be supported in formatMessage
too, e.g.:
props.intl.formatMessage({
key: 'key'
});
Suggested solution:
Update addIdToFormatMessage
visitor to support key
property nodePath.
I have the exact same issue!
Done ✅ Install the latest version 🚀