The project I'm currently working uses react-intl
to handle the i18n and I noticed that components are fed with the formatted message in 3 different ways:
- Using a component:
<FormattedMessage id="MessageId" />
- Using a function:
intl.formatMessage({id: "MessageId"})
- Directly using the messages object:
intl.messages["MessageId"]
I think approach #1 and #2 are the way to go but I think #3 is very limiting.
What are some good reasons to use #3?