We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 161a0f6 commit 115181fCopy full SHA for 115181f
packages/lib/src/hooks/use-app-event.ts
@@ -85,8 +85,8 @@ export function useAppEvent<
85
// update event always receives delta time as first argument
86
(callback as (dt: number) => void)(args[0] as number);
87
} else {
88
- // All other events receive no arguments
89
- (callback as () => void)();
+ // For custom events, forward all arguments to the callback
+ (callback as any)(...args);
90
}
91
}, [callback, event]);
92
0 commit comments