Reactjs is one of the powerful library for building user interfaces.
Let’s start with reactjs project.
To start with reactjs I created a react-starter-kit which can be downloaded from github.
In this starter kit, I am using following modules.
Nodejs — Node server
Expressjs — Express framework
Reactjs — React as view layer
React-router — For routing the application
Eslint — For best practices.
Webpack — For bundling
First, we have to clone this repo.
git clone https://github.com/shabeeb/react-starter-kit
once it cloned we have to move to that directory
Then we have to install all depentency modules. dont worry below commands will do it.
Now our sample reactjs project is ready,
We can run development server using below command
npm run dev
Now go to the editor and change something in
src/components/home.js and see the browser again, react-hot-loader will reload the page.
To run production build
npm run build
it will minify all the js/jsx code and save to build/bundle.js file
npm start or npm run start
will start server with production version.
You can remove the strict code check (best practices ) by removing below lines (line 25 to 30) of code from webpack.config.js
4,814 total views, 5 views today