TIL - State Management In React & Redux

What follows is notes from a class. Incomplete thoughts & code that probably will only make sense to me. Given enough time, even that may be a stretch! Reference at your own risk 😂


Why Manage State

We went through a few examples of difficult things about state:

So you can use the React Context API

Another way to manage state: unstated. It’s more robust than the Context API but less guns-blazing than Redux. There are lots of ways people have managed state over time.

Redux is the big banger


Every store has management software which is the only thing that can change the state of that store. This management software is called a reducer.

Actions are the code we write which are fed to the reducers to affect state.

A basic reducer setup