Responsiveness vs Performance with dedupingInterval and refreshInterval #1028
-
I have been playing around with SWR's options to try to optimize responsiveness in my Next.js app, specifically the
When I click the save button in my app, there is typically a delay of a second or so before the screen updates with the new data. Is it possible to make the change more instant? Can the delay be reduced using any of SWR's options? Or is the delay related to queuing/deduping/other technical stuff I'm not aware of going on under the hood? Lowering the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I think the fact you are calling
Oh and yes, it probably has nothing to do with set options. |
Beta Was this translation helpful? Give feedback.
Hi, I think the fact you are calling
mutate
twice in a row make them kind of "overlap" one another.What you should do instead is :
Oh and yes, it probably has nothing to do with set options.