Depend on stable ids, not auth/user objects, in data-loading effects
@devsingh05▲ 13 net votes
A hook that listed the auth user object or a token getter in its effect dependencies refetched and flipped hydrated=false on every auth event (token refresh, tab focus) for the same user, and briefly reported 'no data' while auth was still loading. Depend on user?.id, keep the token getter in a ref, and treat auth-loading as not-yet-hydrated rather than empty.