Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Creating Your First React Redux Toolkit Project | Getting Started with Redux Toolkit
State Management with Redux Toolkit in React

bookCreating Your First React Redux Toolkit Project

If you're starting a new project with Create React App and want to set up Redux Toolkit, you can use the --template redux flag during project creation:

npx create-react-app my-redux-app --template redux

This will create a new React application with Redux Toolkit already configured.

We have the same list of installed libraries in dependencies in package.json, but the whole app already has predefined store, actions, and reducer.

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

We won't inspect all predefined tools here. We'll create our own in the future for more understanding and customization.

Remember that we have two options to introduce the React Redux library into our React app.

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 5

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

What are the two options for introducing React Redux into a React app?

Can you explain the difference between the predefined tools and creating our own?

Why might we want to create our own Redux setup instead of using the predefined one?

Awesome!

Completion rate improved to 4.17

bookCreating Your First React Redux Toolkit Project

Swipe to show menu

If you're starting a new project with Create React App and want to set up Redux Toolkit, you can use the --template redux flag during project creation:

npx create-react-app my-redux-app --template redux

This will create a new React application with Redux Toolkit already configured.

We have the same list of installed libraries in dependencies in package.json, but the whole app already has predefined store, actions, and reducer.

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

We won't inspect all predefined tools here. We'll create our own in the future for more understanding and customization.

Remember that we have two options to introduce the React Redux library into our React app.

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 5
some-alt