Replies: 1 comment 1 reply
-
I don't think it's ideal to have different settings in dev vs prod mode, as it might surprise users then. With this default, they will never see a So, it's relatively easy to set the desired defaults yourself, as you've shown, but we won't do this in the lib internally. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! Thanks for your awesome library, I'm coming from tRPC land and was confused as to why there are no requests happening as I open up my NextJS local dev server. I took a look at
react-query
and it appears that it only fetches when the device is online (and it just so happens that I'm using my laptop offline), which does make sense as a default.I did a simple configuration change on my
QueryClient
as such:That made me wonder, the default of
"online"
would make a bit more sense whenNODE_ENV
isdevelopment
. I don't think developers will need to assure that they are online or not to test their web apps.And so I propose that the default
networkMode
forreact-query
be set to "always" whenNODE_ENV
isdevelopment
. Just a small suggestion from me, thank you!Beta Was this translation helpful? Give feedback.
All reactions