Releases: vitorbertolucci/react-cached-fetch
Releases · vitorbertolucci/react-cached-fetch
Version 1.4.0
Implements optional cache persistence in sessionStorage or localStorage
Version 1.3.0
- Implements generic typing
- Fixes useCachedFetch behavior by throwing an error when the default fetcher function fails to retrieve data
- Prevents useEffect loop with memoization
- Changes header property type to {[key: string]: string}
- Updated readme
Implements dependencies option
Implements a new option for both global options or hook options called dependencies. This option receives an array of boolean values and waits until all of the are true before calling the fetcher function.
Implements initialValue option
Implements a new option for both global options or hook options called initialValue. This option defines the initial value for the data property returned by the hook while the fetch request isn't fulfilled.