Answer the question
In order to leave comments, you need to log in
How to replace character in string with html tag and draw it all in jsx?
How to replace a character in a string with an html tag and draw it all in jsx
Tried everything for example
{time.replace(String.fromCharCode(183), "<span className='dot'>·</span>")}\
{time.replace(/·/g, <span className='dot'>·</span>)}
{time.replace(/·/g, \<span className='dot'\>·\<\/span\>)}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question