HardState Management📖 Theory Question

Implement a simple pub/sub (useSubscription pattern)

Full Answer

Key Insight: This is the pattern behind useSyncExternalStore. React calls getSnapshot() to check if the value changed and subscribe() to register for future changes. External stores (Zustand, Redux) all implement this interface.

Practice this in a timed sprint →

5 free questions, no signup required

⚡ Start Sprint