For any questions, email me at [email protected]
node.js or io.js should be installed.
Install the following global node modules "npm install --global".
webpack
react-tools
babel
npm install --global babel
npm install --global react-tools
npm install --global webpack
Create a directory where the tutorial code will reside, then inside the directory, issue the following:
npm init
npm install babel-loader style-loader css-loader less-loader jsx-loader
These loaders are webpack plugins which helps webpack embed various types of files to the bundle.
We will also need a local static server, Python has a builtin one called SimpleHTTPServer, if not, install http-server module globally from npm:
npm install --global http-server
Code editor supporting JSX is preferred.
Webstorm has support for JSX and has a free 30-day trial.
Sublime is another good choice, with the following plugin for JSX support:
https://github.com/babel/babel-sublime
For Emacs users, web-mode does a fine job with JSX; but it is recommended to have js2-mode installed as well.
For Vim users, take a look at https://github.com/mxw/vim-jsx or equivalent.
Go over the tutorial at the official React website: http://facebook.github.io/react/docs/tutorial.html
To get an overview of React principles, read "Thinking in React" http://facebook.github.io/react/docs/thinking-in-react.html