To run first react app:
In this tutorial you will learn that how to create and run first app or first program in react.js.
2. After installing, Open windows command prompt & type/enter command- npx create-react-app my-react-app and press Enter from you keyboard.
After that Process of installing required files for react.js environment will be get started. It will take 6-8 minutes as it is creating first app name "my-react-app".
After creating first app it will show message like "Succes! Created my-react-app at C:\Users\Raju\my-react-app ... Happy hacking!";
3. Now go to directory "C:\Users\Raju\my-react-app".
To go to directory enter command- cd my-react-app or cd C:\Users\Raju\my-react-app and press enter
To go to directory enter command- cd my-react-app or cd C:\Users\Raju\my-react-app and press enter
Again enter command- npm start and press enter.
Wait a minute, It will automatically open the app in default browser. If it is opening Internet Explorer (IE) browser (IE browser is currently not supporting all features of react.js ) then copy the URL in Google Chrome browser. Then output app/first react app will look like shown below
This is how you will run a first app of react.js program.
Nice.
ReplyDelete