Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

Create a Zustand-like Module State Library

via egghead.io

Overview

Zustand is a state management library aimed at staying simple and un-opinionated so that you as the developer can build your application as you see fit. To do this it creates a store (module of state) that you can subscribe components to read and update data from.
Zustand leans on hooks as the primary way to interact with your state. This means you get less boilerplate and a centralized, action-based state management solution that scales with the complexity of your app.
Daishi, a core contributor of Zustand, will show you the inner workings of the library by creating a small version of it. You learn how Zustand's API came to be and gain a better understanding of it by the end of this course.

Syllabus

  • Share Module State Between Components in React Similar to Zustand
  • Extract Module Logic (like Zustand) into a Custom React Hook
  • Implement Zustand State Selectors in React to Prevent Unneeded Rerenders
  • Define Actions in a Zustand-like Store to Modify React State
  • Prevent Screen Tearing for React 18 in a Zustand-like App with useSyncExternalStore

Taught by

Daishi Kato

Reviews

4.5 rating at egghead.io based on 11 ratings

Start your review of Create a Zustand-like Module State Library

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.