React Setup Guide
Table of Contents + β
To start building applications with React, you need to set up your development environment. In this guide, we will follow the steps to install the necessary tools and software to create and run your first React application.
Language and Tools to Install
- Node.js: Node.js is required to run the development server and manage packages.
- npm or Yarn: These are package managers that help you install and manage libraries and dependencies for your React application.
- Code Editor: We will use Visual Studio Code, but you can use any code editor of your choice.
- Browser: You will need a modern web browser like Chrome, Firefox, or Edge to run and test your React applications.
Node.js Installation
-
Download Node.js: Visit Node.js official website and download the LTS (Long Term Support) version recommended for most users.
-
Run the Installer: Open the downloaded file and follow the installation wizard. Accept the license agreement and use the default settings.
-
Verify Installation: After installation, open a terminal or command prompt and run the following commands to verify that Node.js and npm are installed correctly:
Terminal window node --versionnpm --versionYou should see version numbers for both Node.js and npm.
-
Update npm (Optional): Itβs a good practice to update npm to the latest version:
Terminal window npm install -g npm@latest