Conteúdo do Curso
Redux Toolkit & React
Redux Toolkit & React
Challenge: Installation of Redux Toolkit
In this exercise, you will learn how to install Redux Toolkit and its required dependencies in a new React project.
Prerequisites
Before proceeding, please ensure you have installed Node.js and NPM on your computer. You can verify this by checking their versions. If you see version numbers, then you can proceed with the task. If not, please refer to the official Node.js documentation to install them on your machine.
Task
Step 1: Create a New React Project
Open your terminal. Create a new React project using Create React App. Run the following command:
Navigate to your project directory:
Step 2: Install Redux Toolkit and Dependencies
In your project directory, run the following command to install Redux Toolkit:
Redux Toolkit may require additional dependencies. Install them using the following command:
Step 3: Verify the Installation
- Open your code editor and navigate to the project directory of your React app;
- Check the
package.json
file in the root directory to ensure that the necessary dependencies are listed; - You should see entries for
@reduxjs/toolkit
andreact-redux
under thedependencies
section.
Step 4: Start the Development Server
- Return to your terminal;
- Start the development server by running:
Open your web browser and go to http://localhost:3000
. You should see your React application running.
Obrigado pelo seu feedback!