Skip to content

How to mutate query params with useSWRInfinite? #658

Answered by sergiodxa
wassim asked this question in General
Discussion options

You must be logged in to vote

The mutate function is not used to change the key, only the cached data. If you want to change the key you are using store part of it in a state and when you update your state it will be updated automatically and trigger a new fetch.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wassim
Comment options

Answer selected by wassim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants