How to create a React JavaScript project
What is React?
React is one of a most developed framework by Facebook or now the company called as Meta used for creating responsive web application. It is built upon JavaScript language to increase productivity by reducing code increasing functionality of programs and reusability of code.one can create react project using node server using the commands present below. To create the project you must have node js as prerequisite to create projects.
If you don't have node installed in your
computer or laptop download it from here by clicking on the links which
will redirect automatically download the application from original
website.
Download Node.js:
- For windows 32 bit version
- For windows 64 bit version
- For Macintosh 64 bit version
- For Linux 64 bit version
Commands to setup react Java Script project:
npx create-react-app app-name
cd app-name
npm install
npm start
Now the project will open in this website in your default browser of your computer or laptop https://localhost:3000
syntax used in detail:
Now I will describe the commands present above:
- npx: The npx stands for Node Package Execute and it comes with the npm (Node Packet Manager) which is used to create executable project of specific library of JavaScript.
- create-react-app: The create-react-app is an excellent tool for beginners, which allows you to create and run React project very quickly.
- In the first line of command the app-name is a place where one can give any name for the project.
- In the next line of commands cd stands for change directory in terminal and bash shell or command line language.
- cd is used to change the directories i.e. Folders present in computer are said to be directories in command line interface.
- In this cd app-name in this app-name is the name of the project you created so that it changes to that directory.
- In the next line npx install command is used to install all the dependencies which are necessary for the react JavaScript project.
- In the next line of commands, you have npx start which is used to start the project in your local system and it will open in your web browser as https://localhost:3000
0 Comments
If you have any doubts or any topics that you want to know more about them please let me know