React Native: Apply Skip to all Queries using Redux State #3527
Replies: 1 comment 2 replies
-
I don't think we currently have a way to do blanket skips, or even skips at the plain-endpoint-only level - just via the hooks. |
Beta Was this translation helpful? Give feedback.
2 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.
-
Background: we render our RN app even while the user is in a "logged out" state because we work in a secure environment where we have to auth challenge every time they background the app. The main app is covered with an auth modal.
I'd like to be able to apply a
skip
parameter to all of our queries (they are generated from swagger.json), e.g. something like looking at the redux state to determine if the user is logged in and therefore if queries should send a network request or not, so as to avoid the failed request.One way that would work is just adding the
skip
token everywhere the hooks are used, but that is a bit cumbersome and repetitive. Any ideas on doing this at a higher level so it applies to all?Beta Was this translation helpful? Give feedback.
All reactions