Blog Details

img
Data Science

How Install React JS

Spoke Right / 14 Nov, 2023

There are some prerequisites to set-up an environment for ReactJS. These are: NodeJS and NPM, React and React DOM, Webpack and Babel. To install ReactJS there are two ways: by using the npm command and by using the create-react-app command.


Using the create-react-app command:

The ‘create-react-app’ is a tool maintained by Facebook for beginners.

Step 1:

Install NodeJS and NPM.

Step 2:

Install React.

Command: npm install -g create-react-app

Step 3:

Create a new React project.

Command: create-react-app project_name

Step 4:

Combine the two steps in a single command.

Command: npx create-react-app project_name

Step 5:

To get started, open the src folder and make changes in your desired file.

Step 6:

Start the server after the completion of the installation process.

Command:

  • cd project_name
  • npm start

Step 7:

The port number will be displayed. Open the port in the browser.

0 comments

Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0