Skip to content

react Intl - How to return a plain translated string instead of return JSX Element(FormattedMessage). #2635

Answered by longlho
yuteen-nikhare-ui asked this question in Q&A
Discussion options

You must be logged in to vote

You can use intl.formatMessage and the way you get a reference to the intl object is via useIntl or injectIntl HOC.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@BrenoVelasco
Comment options

@longlho
Comment options

@BrenoVelasco
Comment options

@longlho
Comment options

@sekoyo
Comment options

Answer selected by longlho
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #2634 on February 23, 2021 14:39.