代码之家  ›  专栏  ›  技术社区  ›  VINET

react中的错误在哪里?

  •  1
  • VINET  · 技术社区  · 8 年前

    我使用命令构建了该文件:

    app.js -o js/ build.js

    什么时候 starting in the browser ,出现错误:

    build.js:196 Uncaught TypeError: React.render is not a function
        at Object.2.react (build.js:196)
        at s (build.js:1)
        at e (build.js:1)
        at build.js:1
    

    1 回复  |  直到 8 年前
        1
  •  1
  •   Josh from Qaribou    8 年前

    render 不再是的一部分 'react' 。如果要渲染到DOM元素,请导入 提供 'react-dom' .