How to create simple react app.
We will use "create-react-app" package to install and configure simple react application from NPM, Open your terminal and install react app.
$ npm i create-react-app -g
Now we have install react and now we can create react app, Go to the directory which you want to install react app and run below command.
$ create-react-app react-app
It will take some time to create app, it will create some of scripts and application for us. So now go to the directory and check.
$ cd react-app
Now we will launch the application which we have created by react.
$ npm start
Compiled successfully!
You can now view react-app in the browser.
Local: http://localhost:3000/
On Your Network: http://192.168.1.133:3000/
Note that the development build is not optimized.
To create a production build, use npm run build.
You can access it by using your ip and port 3000.
You can download app from here : https://github.com/imvishalvyas/simple-react-app.git
Tags
Linux