-
Notifications
You must be signed in to change notification settings - Fork 109
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
Conditionally firing a query #21
Comments
Hi @shlomokraus Right now the only way to do it is to conditionally render a component using the |
I also think that adding "skip" or similar is the best solution. Rendering the component conditionally will break encapsulation. |
This was referenced Dec 19, 2018
This was referenced Dec 21, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to implement a conditional pattern which I am not sure how it should work with hooks.
I have one query asking for currentUser and only when and if it returns a userId I will execute the query.
By the rules of hooks, you must not nest hooks inside conditions or loops, so how can I achieve this?
This is a sample of my custom hook:
The text was updated successfully, but these errors were encountered: