mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +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 () => {
|
return () => {
|
||||||
window.removeEventListener("keyup", downHandler);
|
window.removeEventListener("keyup", downHandler);
|
||||||
};
|
};
|
||||||
}, []);
|
}, [callback, targetKey]);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue