How to call a query proactively? #5380
-
In my case: search data when user input to search box. If the user don't input to search, don't call API to get data. Any you guys have the solution? |
Beta Was this translation helpful? Give feedback.
Answered by
Nick-Lucas
Jan 23, 2024
Replies: 1 comment 1 reply
-
useState for the input value and useQuery with enabled=!!value State drives everything in react so useQuery is designed around that |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kimprosh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
useState for the input value and useQuery with enabled=!!value
State drives everything in react so useQuery is designed around that