What is Redux?

Redux is a global state management library/an application data-flow architecture that we can implement in our React application to manipulate and use the state globally in our app, without causing any props drilling.

The idea is the same with the Context-API but it shows a better performance during the high-frequency updates as I mention inside the Context-API.

How does it work?

It is similar to the Context-API, we have to create a global store to keep and manage states then we need to provide this store to our components. We can only have a single store with Redux.

Then we dispatch actions within the components and these actions trigger the reducer functions to update states inside the store. And from the components, we can reach the data that we need inside the store by using the useSelector hook that Redux provides us.