我想在 react js 中呈现由 API 提供的动态 html 文本,但我不知道该怎么做。
例如 :
dynamicHtml= <div> hello <span color=red> StackOverFlow </span> </div>
render() {
return (
<div> {dynamicHtml} </div>
);
}
我只想在 StackOverFlow 上用红色显示 Hello StackOverFlow