swr icon indicating copy to clipboard operation
swr copied to clipboard

React Hooks for Data Fetching

Results 188 swr issues
Sort by recently updated
recently updated
newest added

# Bug report ## Description / Observed Behavior ```ts import useSWR from "swr"; async function fetchOne(key: string): Promise { return "1"; } async function fetchTwo(key: string): Promise { return 2;...

Bumps [immer](https://github.com/immerjs/immer) from 9.0.5 to 9.0.6. Release notes Sourced from immer's releases. v9.0.6 9.0.6 (2021-08-31) Bug Fixes security: Follow up on CVE-2020-28477 where path: [["__proto__"], "x"] could still pollute the...

dependencies

# Bug report ## Description / Observed Behavior With 2.2.5 (it's not happening with 2.2.4) you can't have this code: ```typescript import type { SWRInfiniteResponse } from "swr/infinite"; export const...

Use the react-router-v6 version and use Outlet to map sub-components. When the navigation is rendered, the const { data } = useSWR('/api/user', fetcher) data of the sub-component will be re-rendered....

Current Issue: The current implementation of cache.get does not support explicit type definitions, which limits type safety and can lead to potential issues with type inference. Here's how it's currently...

# Bug report ## Description / Observed Behavior I'm trying to implement an optimistic update with useSWRMutation. For some reason the data doesn't change optimistically. It is waiting for the...

While implementing optimistic updates using useSWRMutation from the SWR library, I encountered an issue with the documentation available at https://swr.vercel.app/docs/mutation#optimistic-updates. In the example provided: ```js import useSWRMutation from 'swr/mutation' function...

https://github.com/vercel/swr/pull/2862/files added a new `InfiniteKeyedMutator` type, but didn't export it, which meant we had to use [a rather roundabout fix](https://github.com/mdn/yari/pull/10538/commits/e847feddf419e9680dbd7755d46c317a4027cd62): ```ts // "swr/infinite" doesn't export InfiniteKeyedMutator directly type InfiniteKeyedMutator =...

# Bug report ## Description / Observed Behavior The fetcher promise isn't re-executed when the error boundary resets and the component is run again. Happens when Suspense is enabled. ##...

# Bug report ## Description / Observed Behavior I used to use react-query ,mutation onSuccess will call useMutation's onSuccess firstly, and call mutate onSuccess secondly. see here https://tanstack.com/query/v4/docs/framework/react/guides/mutations#consecutive-mutations ``` useMutation({...