Replies: 1 comment
-
Both are fine I think. If you don’t need to access any specific parameter in |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Many of our get endpoints require on query params. Sometimes we just build the string as URL. Also, we have a fetcher function that takes in an optional object to build the string and generate the updated URL string which is used by fetch.
I recently noticed SWR has the tuple pattern as the first argument to the url: https://swr.vercel.app/docs/arguments#multiple-arguments
Does SWR have any recommended approaches to query param url strings? Should the url just be built ahead of time, and therefore the params change as part of url string, or is it preferred to have the static URL and pass in values to the tuple?
This:
vs
Beta Was this translation helpful? Give feedback.
All reactions