TypeRepo

A store is a closure and a set of listeners

Follow a store from its state and listeners through its React binding to its public exports.

pmndrs/zustand · b57db4f

  1. 1. The store

    The whole store is a closure over state plus a Set of listeners.

    src/vanilla.ts

  2. 2. The hook binding

    How useSyncExternalStore turns that store into a React hook.

    src/react.ts

  3. 3. The public surface

    What the package actually exports.

    src/index.ts

Reading practice record...