...
A whole word/sentence is wrapped inside a react/HTML node.
How we use it - example of adding a link
Our sentence in our JSON file:
Code Block | ||
---|---|---|
| ||
hello_msg: "Hello amazing world." |
If we want We are going to add a link on the word ‘amazing’ to www.google.com.
...
Our sentence will now be rendered, but without any link yet.
To render the sentence with a link, the components prop is used.
...
Now in our JSON file, we edit our key where we want our link to be.
Code Block | ||
---|---|---|
| ||
hello_msg: "Hello <linkToGoogle>amazing<linkToGoogle/> world" |