Builds an object encapsulating the state of all feature flags for this session's context.
The most common use case is bootstrapping client-side flags from a back-end service.
Call toJSON() on the returned object to get the data structure used by the client SDK.
Optional options: LDFlagsStateOptionsOptional Returns the context bound to this session.
Determines the JSON variation of a feature flag for this session's context.
This version is preferred in TypeScript because it returns unknown instead of any,
requiring an explicit cast before use.
Generated using TypeDoc
A per-request evaluation scope that binds an LDServerBaseClient to a specific LDContext.
Remarks
This is idiomatic for React Server Components, where the context comes from the incoming request (headers, cookies, auth tokens) and does not change during the render.
Create a session with createLDServerSession.