Uncaught ReferenceError: mountNode is not defined

前端 未结 2 1090
感动是毒
感动是毒 2021-02-18 18:02

forgive me i\'ve searched everywhere and I\'m new in reactjs and trying out examples. I have an error

Uncaught ReferenceError: mountNode is not defined 
<         


        
2条回答
  •  面向向阳花
    2021-02-18 18:24

    You need to tell React where to mount the component. You probably want to replace mountNode with document.getElementById('example') to refer to your

    element:

    React.render(
      ,
      document.getElementById('example')
    );
    

提交回复
热议问题