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
{{ message }}
Repository navigation
useCallableFunctionResponse invokes the cloud function on every re-render #744
useCallableFunctionResponse constructs its observable source eagerly via rxfire's httpsCallable, which invokes the cloud function at hook-render time. Every re-render that doesn't hit the observable cache fires a real cloud function call that is then discarded.
Unlike useIdTokenResult (which wastes a network read), this has a write-side effect: the function executes and bills against quota on every render cycle.
Fix
Wrap in defer() so the function is invoked at subscription time, not render time:
Activity
fix: defer eager requests in storage, auth, and functions hooks (#757)