- Clone this repo
- Perform step 3 in below section (node_modules are not in repo and have to be added at command line).
- Run
meteor
from project folder.
Refer to http://guide.meteor.com/react.html
-
meteor create meteor-with-react_and_blaze_quick_and_dirty
-
cd meteor-with-react_and_blaze_quick_and_dirty
-
meteor npm install --save react react-dom
-
Added file/react component
/client/HelloWorld.jsx
-
Added the following div to
main.html
at line 11:
<div id="embeddedReactComponent"></div>
- Inserted the following lines into
main.js
at line 5:
import HelloWorld from './HelloWorld.jsx'
import React from 'react';
import { render } from 'react-dom';
Meteor.startup(() => {
render(<HelloWorld/>, document.getElementById('embeddedReactComponent'));
});