Create a react application with WordPress Rest API

Assume, create-react-app installed. Otherwise, follow

Install brand new app with bash command.

npx create-react-app mrinalreact

Then, change directory and npm start with following command

cd mrinalreact && npm start

App will start at http://localhost:3000/

Continue reading “Create a react application with WordPress Rest API”

Start adventure with React


First, we have to check our environment has node, npm and create-react-app tools available.

node -v

in command prompt/terminal to check node is available. If not available grab it from Just need to install it. Nothing else.
Then, check npm is available with

npm -v

If it is not latest (5.2+) or broken type

[sudo] npm install npm -g

Hit enter and check npm available.
To install create react app type

[sudo] npm install -g create-react-app

All prerequisite installed.
Then, go to the desired directory in terminal and type

npx create-react-app new-react

Change directory to this new-app. Lastly, start this brand new react application with

cd new-app && npm start