mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
Add useExternalSnapshot + useNitroEventReducer + useMessageEventReducer hooks
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.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
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';
|
||||
|
||||
Reference in New Issue
Block a user