Many React applications (if not most of them) need to manage some sort of state in order to be fully functional. When state changes, the DOM must also change. Moreover the information displayed might be different and specific to a certain state. Generally we can manage state in React using some hooks like useState
and useContext
. More specifically the React Context API is very useful for managing non-local component-wide (or app-wide) state, but it has some cons. This is where Redux comes in.