Use Unstated for State Management in React

Share this video with your friends

Send Tweet

In this lesson I refactor a React component that uses local state to use Unstated. Unstated provides a very nice and straight-forward API to help you manage global state painlessly.

Additional Resources:

Andrew Del Preteinstructor
~ 6 years ago

Small addendum after recording this video, I should have named the item property in the render prop function something more explicit to denote it's coming from a container / store. I think a better name for this property would have been itemStore.

Ie: itemStore.state.items or itemStore.add()