add depdendency array

This commit is contained in:
Corwin 2023-07-05 21:34:07 +01:00
parent f354cff108
commit cb68d8c695
No known key found for this signature in database

View file

@ -13,5 +13,5 @@ export const useOnKeyUp = (targetKey: string, callback: () => void) => {
return () => {
window.removeEventListener("keyup", downHandler);
};
}, []);
}, [callback, targetKey]);
};