|
|
|
|
|
by true_religion
3798 days ago
|
|
I think the issue people have with React is that a lot of tutorials assume you are already using NPM/Babel. If you're using a module importer already then adding React to your stack is pretty easy. For example with JSPM: $ jspm install --dev react react-dom
$ npm install --save-dev babel-preset-react Then add 'react' to your .babelrc preset. In your ES6 javascript file you can now use react via: import React from 'react'; ---- That's it. However, if you have none of that already set up... Then you'll naturally be persuaded that now is the time to get a 'modern' javascript environment setup and doing so can take time. It took me about 2 days of beating through RequireJS --> Webpack --> JSPM before I settled on the latter. Figuring all that was difficult, but looking back on it was extremely useful to now have all my Javascript bundling done within JSPM rather than using some Django bundler, and downloading raw JS files from the internet without evening using Babel to help me write ES6/ES7. |
|