Redux Installation & Setup

Pascual Vila
Frontend Instructor // Code Syllabus
Redux Toolkit (RTK) is the official, recommended way to write Redux logic. It eliminates the boilerplate of legacy Redux and includes powerful utilities out of the box.
1. The Packages
You need @reduxjs/toolkit for creating the store and slices, and react-redux to inject the store into your component tree. Tools like Redux Thunk and DevTools are automatically included in RTK.
2. The Store
The configureStore function replaces the old createStore. It automatically sets up the Redux DevTools extension and middleware. You just pass it an object with a reducer property.
3. The Provider
The <Provider> component makes the Redux store available to any nested components that need to access the Redux state. Usually, this wraps your entire <App /> in your entry file.