You can use the node-html-parser npm package:
import{parse}from'node-html-parser';functionApp(){constroot=parse('<ul id="list"><li>Hello World</li></ul>');consttext=root.querySelector('#list li').innerText;return(<div>{text}</div>);}exportdefaultApp;References: