How do I insert a React component into the middle of a string? #305
Unanswered
liegeandlief
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
Hi @liegeandlief, you could try it with a soultion like this: https://github.com/ivanhofer/typesafe-i18n#how-do-i-render-a-component-inside-a-translation |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks @ivanhofer. I ended up converting the string to Markdown using https://github.com/probablyup/markdown-to-jsx to handle rendering the correct |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Given that I have a string as follows:
Where
Privacy Policyis a link, how would I use this library to translate and output this?I am using React and would need to wrap
Privacy Policyin a customLinkcomponent.Beta Was this translation helpful? Give feedback.
All reactions