Global state management in React with Jotai
Jotai is a global state management solution for React, explains Paul Scanlon in this tutorial about Waku developer Daishi Kato’s project.
If you’ve been using React for a while, you’ll no doubt have experienced scenarios where global state is required. In this article, I’ll explain how you can use Jotai, from Daishi Kato (creator of Waku), to implement really simple, but intuitive, global state for your React applications.
What Is Global State?
Global state differs from local state, which is confined to a specific component. Global state can be shared across multiple components providing read and write functionality.
There are a number of existing solutions that help provide global state in React — you may already be familiar with React’s Context API, Redux, MobX, or React’s useState and useReducer hooks