swr
swr copied to clipboard
React Hooks for Data Fetching
# Bug report I have a query (call them B, see below), which is initally not loading, and is loading and at the end is not loading again (as expected)...
# Bug report ## Description / Observed Behavior When combined with `{ initialSize: 10 }`, I expect `useSWRInfinite` to load first 10 pages one by one, by passing data for...
# Bug report ## Description / Observed Behavior When configured with `{ suspense: true }`, `useSWRSubscription` will render repeatedly, suspend indefinitely, and never call `subscribe()`. ## Expected Behavior I would...
This pull request aims to improve the type safety and reliability of the useStateWithDeps hook in React. Specifically, the changes address potential issues with accessing state properties using dynamic keys,...
# Bug report ## Description / Observed Behavior Passing an array to `useSWR([key, key], fetcherFn)` doesn't seem to cache the keys individually. ## Expected Behavior I should be able to...
```jsx const { data } = useSWR([url,key], ([url,params]) => axios.get(url,{params}), ) preload( [url,key], ([url,params]) => axios.get(url,{params}), ) ```
``` /** Hook for clearing cache */ export const useClearCache = () => { const { mutate } = useSWRConfig() const clearCache = () => { mutate(() => true, undefined,...
This commit refactors the version bump script to enhance its readability and maintainability. The following changes have been made: - Consolidated environment variable extraction for cleaner code. - Simplified the...
# Bug report ## Description / Observed Behavior I have a series of pages fetched via useSWRInfinite. I am attempting to invalidate them via the global mutate function. In testing,...
# Bug report ## Description / Observed Behavior I am experiencing requests to the same endpoint/cache key within the dedupeInterval and i don't think this is the expected behaviour? In...