Mutating endpoint on query change #1306
Unanswered
yiliansource
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there!
I'm playing around with creating a search/filter component that utilitizes
swr
to fetch the data from an endpoint. I want the data to always be visibly refetched when the user modifies the query. Normally this is not the case, since I assume the stored data is used, if the endpoint is identical?I've worked around this by using the following:
This works, but I am wondering if this is an intended possible practice, or if this is hacky and could break something.
Beta Was this translation helpful? Give feedback.
All reactions