Skip to content

Commit de4ac44

Browse files
Fixed stale state issue in callbacks
1 parent 8258c6a commit de4ac44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const useHotKeys = (hotkey, handler, userConfig, externalDocument) => {
3131
const mousetrapInstance = bindHotKey({
3232
mode: memoizedConfig.mode,
3333
hotkey: convertedHotkey,
34-
handler: handlerRef.current,
34+
handler: (...args) => handlerRef.current(...args),
3535
ref,
3636
externalDocument,
3737
});

0 commit comments

Comments
 (0)