Can I use jsx without React to inline HTML in script?

后端 未结 8 1760
既然无缘
既然无缘 2021-01-31 02:20

Can I use inline HTML in a script as below by using a library like jsx:




        
8条回答
  •  感情败类
    2021-01-31 03:07

    Jsx parse the return (

    test html code
    ); to something like this return React.createElement('div', {...});

    then if you don't using react.js, then browser will not know what React is and trigger an error.

提交回复
热议问题