formatjs
formatjs copied to clipboard
Possible to call formatMessage in a utils file?
If I have a utility file containing a set of exported functions, rather than a component with props, is there a way to use formatMessage here?
You'll need to pass the format* functions as parameters if you want to reuse your react-intl settings
Oh yeah, that makes sense. I think that will work.
If you need more than the formatMessage methods (current locale...), pass the intl shape
If you think your issue is answered, please close the thread.