- React Tutorial
- React Home
- React Setup
- React Introduction
- React ES6
- React Render HTML
- React JSX
- React Components
- React Class
- React Props
- React Events
- React Conditional
- React Lists
- React Forms
- React Router
- React Memo
- React CSS Styling
- React Hooks
- What is a Hook?
- React useState
- React useEffect
- React useContext
- React useRef
- React useReducer
- React useCallback
- React useMemo
- React Custom Hooks
React Setup
Node.js
Before getting started with React development, ensure you have Node.js installed on your system.
Creating Our First React App
Open Your Terminal: Navigate to the directory where you want to create your React application.
Create a React Application: Run the following command to create a new React application named my-react-app:
Alternatively, if you want to create the app in the current directory without specifying a name:
Note: Ensure your folder name doesn't contain spaces or capital letters due to npm naming restrictions.
Navigate to the App Directory: If you specified a folder name while creating the app, enter that directory:
Start the Application: Start the React application with:
This command will launch a development server, and your React application will be accessible in your default web browser.