Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Installing Redux Toolkit | Getting Started with Redux Toolkit
State Management with Redux Toolkit in React

bookInstalling Redux Toolkit

1. Create a React Project

If you don't have a React project yet, create one using Create React App. Open your terminal and run:

npx create-react-app my-great-app
cd my-great-app

2. Installing Redux Toolkit

Navigate to your project directory and install Redux Toolkit:

npm install @reduxjs/toolkit

3. Installing Additional Dependencies

Redux Toolkit may require additional dependencies like react-redux. This way, we can use Redux in React. Install them using:

npm install react-redux 

Once you have completed all the instructions, make sure to check that your package.json file includes the dependencies listed below:

"dependencies": {
  "@reduxjs/toolkit": "^1.9.7",
  "@testing-library/jest-dom": "^5.17.0",
  "@testing-library/react": "^13.4.0",
  "@testing-library/user-event": "^13.5.0",
  "react": "^18.2.0",
  "react-dom": "^18.2.0",
  "react-redux": "^8.1.3",
  "react-scripts": "5.0.1",
  "web-vitals": "^2.1.4"
},

Your project structure is supposed to look like the following:

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 4

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Suggested prompts:

Can you explain what each dependency in the package.json file is used for?

What should I do if my package versions are different from the ones listed?

Can you describe the main folders and files in the project structure image?

Awesome!

Completion rate improved to 4.17

bookInstalling Redux Toolkit

Desliza para mostrar el menú

1. Create a React Project

If you don't have a React project yet, create one using Create React App. Open your terminal and run:

npx create-react-app my-great-app
cd my-great-app

2. Installing Redux Toolkit

Navigate to your project directory and install Redux Toolkit:

npm install @reduxjs/toolkit

3. Installing Additional Dependencies

Redux Toolkit may require additional dependencies like react-redux. This way, we can use Redux in React. Install them using:

npm install react-redux 

Once you have completed all the instructions, make sure to check that your package.json file includes the dependencies listed below:

"dependencies": {
  "@reduxjs/toolkit": "^1.9.7",
  "@testing-library/jest-dom": "^5.17.0",
  "@testing-library/react": "^13.4.0",
  "@testing-library/user-event": "^13.5.0",
  "react": "^18.2.0",
  "react-dom": "^18.2.0",
  "react-redux": "^8.1.3",
  "react-scripts": "5.0.1",
  "web-vitals": "^2.1.4"
},

Your project structure is supposed to look like the following:

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 4
some-alt