I have to make a simple react component which displays a translated string on two rows, second row must start always with the third word.
example:
<div className="parent">
<p>{t('myText')}</p>
</div>
myText value from the translation file is = "Text that I want to display"
I tried using this "Text that n I want to display
" but didn’t work.
which would be the best and the simplest way to solve this?
2
Answers
Use p tag it separated blocks by blank lines
As per your question, you need code in react.js. Here is a component code.
Jsx file code