Type Alias StartStopNotifier<T>
StartStopNotifier <T>: ((set: ((value: T) => void), update: ((fn: Updater<T>) => void)) => void | (() => void))
Type Parameters
Type declaration
- (set, update): void | (() => void)
Parameters
Returns void | (() => void)
Optionally, a cleanup function that is called when the last remaining subscriber unsubscribes.
Start and stop notification callbacks. This function is called when the first subscriber subscribes.