mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Init V3
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { GetEventDispatcher, NitroEvent } from '@nitrots/nitro-renderer';
|
||||
import { useEventDispatcher } from './useEventDispatcher';
|
||||
|
||||
export const useNitroEvent = <T extends NitroEvent>(
|
||||
type: string | string[],
|
||||
handler: (event: T) => void,
|
||||
enabled = true
|
||||
) => useEventDispatcher(type, GetEventDispatcher(), handler, enabled);
|
||||
Reference in New Issue
Block a user