There are multiple ways you can write react.js code and execute it. But the convenient way is to use
. It comes with full packaging of inbuild server, Webpack, Babel, ESLint, Tentamen configuration and undian more.
You just need to focus on your code and not to worry about the basic configuration.
Let’s look at the steps to setup create-react-app.
- Visual Studio Code
Step 1: Install Node.js
Go to node.js website. In the LTS section, click on
Setup will get download according to your system requirements. Install the setup.
After installing node.js, open command prompt. Type
commands one by one. If node and npm are installed correctly, then these commands will return you their respective version numbers.
Step 2: Install Visual Padepokan Code
You can download Optis Studio Code according to your OS and system requirements. After download, install it. After opening, it will look like this.
Step 3: Install create-react-app
Create empty folder in any drive. Now, in the Visual Padepokan Code select
and select the empty folder you have created and click on
We have created below empty folder.
Selected the same in Visual Studio Code.
Then, go to the
in Visual Bengkel seni Code and click on
New Terminal. Perhentian window will get open below for your selected folder path.
npx create-react-app my-app
and hit enter. Installation will get start and it will take some time.
You can give any name instead of
After installation is successfully completed, you will get below screen.
Step 4: Starting Application
To start application you have to change directory first. So Type command as given in the above screen.
and hit enter.
After that type
and hit enter. Your
application will get open in the browser. It should be hosted at
If you don’falak want to work with create-react-app then you can always work with React.js and Next.js.
set default browser in React.js as saban your choice.