Shu Ding

Results 403 comments of Shu Ding

@grazianodev yeah we've considered adding an option to skip revalidation when the cache exists. But we don't have a strong opinion on it. Personally I think it's okay to add...

@mohammedhammoud we now have a new hook in the latest beta version (try it by installing `swr@beta`): ```js import useSWRImmutable from 'swr/immutable' ``` As well as an `revalidateWhenStale: boolean` option...

@Brawl345 yeah we should have made it clearer in the docs (or as a blog post), gonna reopen this issue for tracking. If you want to use immutable mode for...

Thanks @yume-chan, very helpful feedback! I think overall infinite loading is a tricky problem, like you said a solid API implementation like Twitter needs bi-directional cursoring and some pushing mechanism...

It turns to be introduced in #1498 which I think should be the correct behavior, that `mutate()` will not be deduplicated by default because it was triggered explicitly by the...

Thank you for opening this! This is currently by design, but I think we can improve it so we can differentiate "fetch" errors and "mutate" errors (haven't found a good...

@dangdennis That might not be related to this thread, but did you mean [conditional fetching](https://swr.vercel.app/docs/conditional-fetching#conditional) (the key function throws an error, which pauses the request).

Also worth noting, #1160 might help this. We can build a status middleware to attach a status enum to the SWR return object.

@koba04 Sorry I should explain a bit more. I think he's referring to this example: https://swr.vercel.app/examples/infinite-loading, which is very basic. Added the label since we need an example specifically for...

Sounds like a nice thing to have to me! Only concern is should we allow both at the same time? Does that confuse people?