-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add skip condition on endpoint definition #4813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 00aaf87:
|
✅ Deploy Preview for redux-starter-kit-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
36fde17
to
00aaf87
Compare
From some internal discussion:
which is a valid concern. I like the idea of this option, but it also feels like it will need some deeper consideration to figure out ramifications. |
Hey @markerikson, just circling back to this, is there anything I can do on my end for this or does this need to be solved at a project level since it effects other things already? |
Unfortunately it's not something I'm going to have time to look at any time soon. My current focus is wrapping up the Immer perf work, and then I'll be turning my attention to React-Redux. I think the last comment is still where things stand - I like the idea conceptually, it's reasonable, but I'm pretty sure this will end up having some unexpected impacts and we'd need time to try to figure out what those might be. I realize that's a very unsatisfying answer, and I apologize that I don't have more concrete feedback at this point :( |
Adds a skip condition function to the endpoint definition to "skip" making the network request when returned
true
. Instead of needing to set the skip on every query hook it can be applied at a more global layer.In order to keep
isUninitialized
set totrue
, the same way it works withskip
on the hook, I needed to add a check for it in the useQuery hook.Closes #4810