MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / subscribe

Function subscribe

zustand-test/src/myZustand.js:26–29  ·  view source on GitHub ↗
(listener)

Source from the content-addressed store, hash-verified

24 const getState = () => state;
25
26 const subscribe= (listener) => {
27 listeners.add(listener)
28 return () => listeners.delete(listener)
29 }
30
31 const destroy= () => {
32 listeners.clear()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected