Swr: [Question]: is it as designed that trigger and mutate will follow dedupingInterval

Created on 17 Feb 2020  Â·  2Comments  Â·  Source: vercel/swr

Hey,

small question: is it as designed, that a manual trigger will follow the dedupingInterval and don't invalidate the cached item if it was less than the dedupingInterval?

Example: https://codesandbox.io/s/quirky-albattani-ttfrw

Expected: On each button click the new time will be fetched

Actual: It only will be fetched if I click slower than 200ms (default dedupingInterval)

Version: 0.1.17

bug

Most helpful comment

This must be a bug. By design trigger or mutate should never be deduped.

All 2 comments

I encountered the same situation.

Not only trigger, but also mutate will be omitted when it starts in less than dedupingInterval since the latest revalidate.

swr version:0.1.12
default dedupingInterval: 2000ms

This must be a bug. By design trigger or mutate should never be deduped.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sergiodxa picture sergiodxa  Â·  4Comments

loveholly picture loveholly  Â·  3Comments

Svish picture Svish  Â·  5Comments

bcomnes picture bcomnes  Â·  3Comments

DoT214 picture DoT214  Â·  4Comments