Using Redux

Learn how to use Redux for global state management.

In 2015, two years after the initial React public release, there weren’t as many frameworks and libraries as today for handling large-scale application states. The most advanced way for handling unidirectional data flow was Flux, which, as time has passed, has been superseded by more straightforward and modern libraries such as Redux and MobX.

Redux, in particular, had a significant impact on the React community and quickly became a de facto state manager for building large-scale applications in React.

In this lesson, we’ll be using plain Redux (without middleware such as redux-thunk or redux-saga) for managing the storefront state instead of using the React Context APIs.

Let’s start with the boilerplate code.

Click the “Run” button below to execute the code. Once the execution is completed, observe the output by navigating to the link provided at the bottom of the playground.

Get hands-on with 1200+ tech skills courses.