Skip to content
Discussion options

You must be logged in to vote

enabled is just a flag, it doesn’t take a function. I don’t think you can make a query dependent on itself like that. You could add a useEffect that sets a boolean state variable, and you enable/disable your query depending on that.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tannerlinsley
Comment options

@TasukuUno
Comment options

Answer selected by tannerlinsley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants