

With time it results in an enlarged codebase where it’s difficult to keep track of those props. Props drilling is a bad practice of passing properties through components down the hierarchy without having them used in the process. In such cases, the so-called props drilling problem appears. However, if a state needs to be shared with a lot of components that belong to different parts of the app structure, the data flow gets more complex. If the process involves only components having parent-child relationships with the component initiating a state change, the logic is simple. Sometimes it shares the input in the form of props with other components that rely on the changed data. Without Redux, each component of a React app handles user input and manages its own state. Now it’s an independent library that can be used in all sorts of JavaScript apps built with different frameworks (Angular, Vue, and others). Redux was initially created by Dan Abramov and Andrew Clark in 2015 to simplify the state management in React apps built at Facebook. So what is Redux and how does it work? Redux state management library It controls when a certain slice of the app state changes, where a particular piece of data comes from, and whether your app responds to it with predictable behavior or not. This process requires passing data to multiple app components, syncing between them, and storing the app state. With hundreds of actions a user can take in the interface, you need a good system and logic in place to manage the dynamic state of your app. But sometimes they affect multiple components and get reflected in different parts of the app. Sometimes those changes take place right in the UI component the user interacts with. The React app interface responds to user actions with changes in the interface.

The main advantage of React web apps over static websites is their interactivity. Let’s look at what Redux is, what problems it solves, and consider whether using Redux in your app is reasonable and beneficial. In many cases, the app state and data can be managed using alternative approaches with lower overhead and simpler implementation. It appears that far not all React apps really need Redux. However, there are many talks about overusing Redux. Redux is still popular for helping developers build consistent user interfaces and cope with complex logic for app state management. In his Reactathon talk about The State of Redux in 2019, Mark Erikson, the Redux Maintainer, said: “Redux is used in 55% of React apps and is going to be around for a long time”.
