I suggest, that this should be allowed
<Helmet >
<FormattedMessage {...msg.title}>
{title => <title>{title}</title>}
</FormattedMessage>
</Helmet>
What do you think?
Thanks for your interest in Helmet.
You can see an explanation here - https://github.com/nfl/react-helmet/issues/262#issuecomment-291000077
You can also use the injectIntl HoC and do intl.formatMessage() in your component instead.
@cesarp Yes, I know that. I just prefer less imperative approach.
@cwelch5 By the way, just FYI https://twitter.com/dan_abramov/status/855872355406671872 ))
You can simply switch things around:
<FormattedMessage id="msg.title">
{title => <Helmet><title>{title}</title></Helmet>}
</FormattedMessage>
You can simply switch things around:
<FormattedMessage id="msg.title"> {title => <Helmet><title>{title}</title></Helmet>} </FormattedMessage>
Thanks @fxlemire , it works!
You can simply switch things around:
<FormattedMessage id="msg.title"> {title => <Helmet><title>{title}</title></Helmet>} </FormattedMessage>
save my day! kkk
Most helpful comment
You can simply switch things around: