Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • A whole word/sentence is wrapped inside a react/HTML node.

Our sentence in our JSON file:

Code Block
languagejs
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
languagejs
hello_msg: "Hello <linkToGoogle>amazing<linkToGoogle/> world"