Releases: knightburton/react-hooks-toolkit
Releases · knightburton/react-hooks-toolkit
v1.1.0
- Introduce the new
debounceFunctionhook feature.
// declaration
const useDebounceFunction = (callback: () => void, delay = 500): (() => void) = {};
// example
const debouncedLog = useDebounceFunction(console.log);
// non relevant lines of code goes here...
// then
debouncedLog('You know the question...', 42);- Enhance the existing hooks that using
setIntervalorsetTimeout.
Now all of those usinguseRefto track thetimeoudIdorintervalId.
v1.0.0
Reset error and data in useFetch in case of cross action