If you create first react.js application in a live server or a local system you should me installed the following things in your local system or live server.
How to install node.js latest version in ubuntu please visit the following link it will help you install and setup node.js in your local system.
Also check : How to install Node.js
Create a New React App
Run the following command in your terminal for creating a new fresh React.js application.
sudo npx create-react-app my-first-app --use-npm
After done or create React.js application in your local system. application structure looks like bellow.
my-first-app ├── build ├── node_modules ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json ├── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── serviceWorker.js ├── .gitignore ├── package.json └── README.md
in react.js application main entry point file is
Run React App
After done create react.js first application our local system then how to run it? just run the following command in the terminal.
cd my-first-app sudo npm start
After running the above command in terminal then the following output show in your terminal. please see the following screenshot.
Now, run the
http://localhost:3000 in your browser and your first react.js application landing page look like:
As you can see, create a react.js application is very easy we hope you like this article. if you like it then please give thumbs up and write the comment regarding any issue or questions.