Question about queryOption pattern #7591
Unanswered
wildfrontend
asked this question in
Q&A
Replies: 1 comment
-
you can either provide a different queryFn on the server by overwriting the default one, or you can do a check inside the queryFn if you are on the server or the client and behave differently then (this is what trpc is doing for example) |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
when i use prefetch ,the queryFn would be fetch api from server side,
but almost time for loading balance we would be use interal api url to fetch data
so when we have to clien side queryFn and server side queryFn
but in queryOption example , it is use exteranl api url to fetch data , is it a good design?
Beta Was this translation helpful? Give feedback.
All reactions