CupThread React Native & Expo SDK - v0.1.0
    Preparing search index...

    Function useCupThreadTokenReadiness

    • Hook reporting whether the resolved user token is final.

      Returns boolean

      true once the token reflects the persisted value (or an explicit prop). Token-dependent data fetches should wait for this to avoid racing an async storage adapter and attributing early requests to a throwaway identity.

      function Requests() {
      const isTokenReady = useCupThreadTokenReadiness();
      useEffect(() => {
      if (!isTokenReady) return;
      // fetch with the resolved user token
      }, [isTokenReady]);
      return null;
      }