react-query-firebase
react-query-firebase copied to clipboard
Enabled option error
Please help me with a problem
Description of the problem:
Everything works fine until I refresh the browser page. I expect the request to be executed after the userId is true But subscribe seems to ignore the enabled option
That is, the userId does not have time to form, as it makes a request?
What am I doing wrong?
Writing user.uid to the global state

Getting a collection by userId from the global state

I think you need to add the constraint to request's queryKey e.g.
return useFirestoreQuery([userId, { userId }].....