1

I built the file using commands:

browserify -t reactify js/app.js -o js/build.js

When starting in the browser, an error occurs:

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

How to fix it?

Mayank Shukla
  • 100,735
  • 18
  • 158
  • 142
VINET
  • 641
  • 1
  • 7
  • 28

1 Answers1

1

render is no longer part of 'react'. If you want to render to a DOM element, import render from 'react-dom'.

Josh from Qaribou
  • 6,776
  • 2
  • 23
  • 21
  • I added var ReactDOM = require ('react-dom'); In the file app.js but the error remained the same. Maybe need to add something else? https://github.com/StekolschikovV/reactjs-learn/blob/master/js/app.js – VINET Jul 09 '17 at 12:09
  • You're still saying `React.render`. It's `ReactDOM.render`. – Josh from Qaribou Jul 09 '17 at 12:36