Skip to content

Releases: knightburton/react-hooks-toolkit

v1.1.0

25 Oct 19:20
Compare
Choose a tag to compare
  • Introduce the new debounceFunction hook 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 setInterval or setTimeout.
    Now all of those using useRef to track the timeoudId or intervalId.

v1.0.0

06 Jan 15:36
Compare
Choose a tag to compare
Reset error and data in useFetch in case of cross action