mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
bb1238a5e5
The three companions promised in docs/ARCHITECTURE.md proposal #1 ('Companion to add later') are now in src/hooks/events/: - useExternalSnapshot wraps useSyncExternalStore for the renderer's EventDispatcher.subscribe() + getXxxSnapshot() pairing introduced in Nitro_Render_V3 2.1.0. - useNitroEventReducer and useMessageEventReducer mirror the existing *State hooks but collapse multiple event types into a single owned state slice. The message variant accepts either a single event type or an array; subscription is wired through a single useEffect to keep the rules-of-hooks happy.
10 lines
335 B
TypeScript
10 lines
335 B
TypeScript
export * from './useEventDispatcher';
|
|
export * from './useExternalSnapshot';
|
|
export * from './useMessageEvent';
|
|
export * from './useMessageEventReducer';
|
|
export * from './useMessageEventState';
|
|
export * from './useNitroEvent';
|
|
export * from './useNitroEventReducer';
|
|
export * from './useNitroEventState';
|
|
export * from './useUiEvent';
|