swr icon indicating copy to clipboard operation
swr copied to clipboard

When revalidateOnFocus and dedupingInterval are used together

Open aneequrrehman opened this issue 4 years ago • 0 comments

There are scenarios when we want to ensure the request is revalidated upon focus regardless of whatever dedupingInterval was set. On the other hand, there are scenarios where we want to consider dedupingInterval even when refocused.

The latter is the default behavior of the library. Shouldn't there be a config setting to change this default bahavior?

Of course, we can always do that by manually triggering a revalidate call. Just was curious if I'm missing something.

aneequrrehman avatar Apr 28 '20 17:04 aneequrrehman