We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
First install the packages:
npm install --save react react-dom reactify
Then add to your browser transform in server/index.js:
server/index.js
routes.get('/app-bundle.js', - browserify('./client/app.js')) + browserify('./client/app.js', { + transform: [ require('reactify') ] + }))
And that's it! Now you can start using react in client/app.js. Here's a starting point (replace the code in client/app.js with the following):
client/app.js
// client/app.js var React = require('react'); var ReactDOM = require('react-dom'); ReactDOM.render( <h1>Hello, world!</h1>, // JSX document.getElementById('app') );