Skip to content
Discussion options

You must be logged in to vote

Wouldn't this be a use case for a key with multiple arguments? https://swr.vercel.app/docs/arguments#multiple-arguments

[query, subject,...etc] would be the key, and you can even do this nice thing with trigger, https://swr.vercel.app/docs/mutation.en-US#defer-loading-data-until-needed on the useSWRMutation hook, so that you don't spam your server.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by Kilanvl1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants