Defined in: store.ts:4
• TState
• TUpdater extends AnyUpdater = (cb) => TState
optional onSubscribe: (listener, store) => () => void;
optional onSubscribe: (listener, store) => () => void;
Defined in: store.ts:17
Called when a listener subscribes to the store.
Listener<TState>
Store<TState, TUpdater>
Function
a function to unsubscribe the listener
void
optional onUpdate: () => void;
optional onUpdate: () => void;
Defined in: store.ts:24
Called after the state has been updated, used to derive other state.
void
optional updateFn: (previous) => (updater) => TState;
optional updateFn: (previous) => (updater) => TState;
Defined in: store.ts:11
Replace the default update function with a custom one.
TState
Function
TUpdater
TState
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.