After making my first AngularJS2 on NodeJS through the WebPack I wanted to use the same technology on ReactJS:
AngularJS2 doesn’t allow to use the <script> tag and the only way for making a project using that technology is using NPM:
- install all dependencies on NodeJS using NPM including the WebPack
- deploy the application on the NodeJS instance running locally on your computer
- building a HTML/JS file for making it running on the Apache
That’s much more different from the usual way of working which needed just to write a html file importing the js file inside and opening the html file using a normal browser for testing the application
ReactJS allows the user to choose between using the <script> tag or making the application using nodejs and NPM.
My previous applications were made using ReactJS and the <script> tag, today I’ve tested the second way of working.
What I did was to:
- Download a ReactJS seed project which has already set up webpack, npm, grunt, gulp and contains a guide about how to run the project locally and how to build the project in production
- I installed React Scroll spy on that seed project
- I replaced the source code of the ReactJS seed project with the React Scroll spy NPM plugin project
- I installed React Bootstrap
- I integrated the bootstrap modal to that project
Basically I’ve written few lines of code but I’ve done a huge configuration-integration work and now I think I’m able to work with ReactJS and NPM without using the <script> tag which I believe will be mandatory in the future