mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
add depdendency array
This commit is contained in:
parent
f354cff108
commit
cb68d8c695
|
@ -13,5 +13,5 @@ export const useOnKeyUp = (targetKey: string, callback: () => void) => {
|
|||
return () => {
|
||||
window.removeEventListener("keyup", downHandler);
|
||||
};
|
||||
}, []);
|
||||
}, [callback, targetKey]);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue