You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enable the 'usePrefetch' for the react-query client
try to use the prefetch hook conditionaly, for example on click event handler
What happens?
Due to the nature of the hooks, you can not call them condionally. Also the enabled switch is ignored by react query if is a prefetch. So the prefetch hooks can not be called in event handlers such as on click, etc.
What were you expecting to happen?
I would expect to be able to pass user data as parameter for the prefetch query.
The text was updated successfully, but these errors were encountered:
What are the steps to reproduce this issue?
What happens?
Due to the nature of the hooks, you can not call them condionally. Also the
enabled
switch is ignored by react query if is a prefetch. So the prefetch hooks can not be called in event handlers such as on click, etc.What were you expecting to happen?
I would expect to be able to pass user data as parameter for the prefetch query.
The text was updated successfully, but these errors were encountered: