Redux Toolkit Overview
Purpose
The Redux Toolkit package was built with the intention on being the standard way of writing Redux logic. It was mainly created to help address the three common concerns of Redux.
- "Configuring a Redux store is too complicated"
- "I have to add a lot of packages to get Redux to do anything useful"
- "Redux requires too much boilerplate code"
Benefits
Some benefits of using Redux Toolkit are:
- Simple : Includes utilities to simplify common use cases like store setup, creating reducers, immutable update logic, and more.
- Opinionated : Provides good defaults for store setup out of the box, and includes the most commonly used Redux addons built-in.
- Powerful : Takes inspiration from libraries like Immer and Autodux to let you write "mutative" immutable update logic, and even create entire "slices" of state automatically.
- Effective : Lets you focus on the core logic your app needs, so you can do more work with less code.
More information on the purpose and installation of Redux Toolkit can be found on their page.