mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
fix ts definition to get no argument for dispatch function
This commit is contained in:
parent
036d1c2f1f
commit
baab9df948
@ -4,7 +4,7 @@ const updateReducer = (num: number): number => (num + 1) % 1_000_000;
|
||||
|
||||
const useUpdate = () => {
|
||||
const [, update] = useReducer(updateReducer, 0);
|
||||
return update;
|
||||
return update as (() => void);
|
||||
};
|
||||
|
||||
export default useUpdate;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user