Skip to content

AtloriaProviderWrapper

reference
1 min readUpdated

Kind: Component

Source: atloria-monorepo/apps/web/src/components/Providers.tsx

Inner provider that uses the session. The token is exposed through a REF, not a closure over the session snapshot: on a hard navigation NextAuth resolves the session asynchronously, and a fetch started before that resolution must see the token the moment it arrives. The old closure captured null forever, so every full page load of data-fetching pages 401'd after the retry budget (the "No technical snapshot yet" bug on generated projects).

Props

NameTypeRequiredDefault
childrenReactNode-

Diagram

mermaid
graph TD
    component_AtloriaProviderWrapper_5a8540c4["AtloriaProviderWrapper"]
    class component_AtloriaProviderWrapper_5a8540c4 rootComponent

Relationships

  • RENDERS → AtloriaProvider
  • USES_HOOK → useSession
  • USES_HOOK → useRef
  • USES_HOOK → useEffect
  • USES_HOOK → useMemo

Referenced By

  • Providers (RENDERS)

Was this page helpful?

Download as PDF