Dilla in Tech
An idea can transform the world and rewrite all the rules...
Thursday, August 4, 2016
Hello World with React
First create a folder called hello-world-react and initialize npm within the folder.
For this demo, you must have installed
. Next install following node packages.
Next create following files in the project folder.
Edit webpack.config.js file like below.
index.html file content should be like below.
Next edit App.js file like below.
Now we need to change main.js file accordingly.
Next we need to edit package.json file to add start script.
Run our first react project using following command.
In browser for localhost:8888, and you will see following content. Now you can edit your project content and it will automatically reder in browser.
Share to Twitter
Share to Facebook
Share to Pinterest
Post a Comment
Post Comments (Atom)