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
I found this very interesting and something that I often find myself needing with the hooks, especially as it relates to user based content where I don't want to trigger a subscription and everything else if the user is not logged in or at least until that data is available. This could also be used with other conditional data and could help in reducing lot of boilerplate code to handle such scenarios or wait with execution until the given data is available so that I don't have a flash of 404 page and similar issues.
The text was updated successfully, but these errors were encountered:
Do you have anything in particular in mind? For example, useSubscribe already supports it, since the name (1st argument) is optional, and there's no subscription made if it's undefined.
useFind also supports that via undefined and null in the result of the first argument. And useTrcker can just do an early return. Sure, there’s no extra prop, but it’s clear when read (I see and use it often).
I was recently looking at React Query and found in their docs that they have something called dependent queries:
https://tanstack.com/query/latest/docs/framework/react/guides/dependent-queries
I found this very interesting and something that I often find myself needing with the hooks, especially as it relates to user based content where I don't want to trigger a subscription and everything else if the user is not logged in or at least until that data is available. This could also be used with other conditional data and could help in reducing lot of boilerplate code to handle such scenarios or wait with execution until the given data is available so that I don't have a flash of 404 page and similar issues.
The text was updated successfully, but these errors were encountered: