FF
FeatureFlare docs
Guides and API reference
API reference

FeatureFlareReactConfig

Provider configuration fields and runtime behavior controls.

Current section
Component and config reference
Use these pages when you need props, defaults, and provider behavior details.

FeatureFlareReactConfig

Configuration shape passed to FeatureFlareProviderthrough the config prop.

More on this: pair this page with FeatureFlareProvider to understand controlled and uncontrolled provider behavior.

export type FeatureFlareReactConfig = {
  apiBaseUrl?: string;
  sdkKey?: string;
  projectKey?: string;
  envKey?: FeatureFlareEnvironmentKey | string;
  timeoutMs?: number;
  maxRetries?: number;
  backoffMs?: number;
  jitter?: number;
  cacheTtlMs?: number;
  staleTtlMs?: number;
  bootstrap?: FeatureFlareBootstrapPayload;
  waitForFlags?: boolean;
  waitForFlagAuth?: boolean;
  persistentCache?: FeatureFlarePersistentCacheAdapter;
  onMetric?: (metricName: FeatureFlareMetricName, value: number, tags?: FeatureFlareMetricTags) => void;
  realtime?: {
    enabled?: boolean;
    pollingIntervalMs?: number;
    ssePath?: string;
    disconnectWhenHidden?: boolean;
  };
}

Core Connection Fields

apiBaseUrl?: string

Optional explicit FeatureFlare API base URL.

sdkKey?: string

Recommended browser/client key for authenticated SDK evaluation paths.

projectKey?: string

Legacy browser fallback that targets the project directly. Prefer sdkKey for current client-side integrations.

envKey?: FeatureFlareEnvironmentKey | string

Optional explicit environment selector for legacy/direct evaluation flows. Supports the standard FeatureFlareEnvironmentKey literals or a custom environment key string.

Networking and Retry Controls

timeoutMs?: number

Per-request timeout in milliseconds.

maxRetries?: number

Maximum retry attempts for recoverable request failures.

backoffMs?: number

Base retry backoff duration in milliseconds.

jitter?: number

Jitter factor for backoff to reduce synchronized retry spikes.

Caching and Bootstrap

cacheTtlMs?: number

Fresh cache lifetime in milliseconds.

staleTtlMs?: number

Stale cache lifetime for graceful fallback before hard refresh.

bootstrap?: FeatureFlareBootstrapPayload

Optional initial flag snapshot to reduce cold-start latency. See FeatureFlareBootstrapPayload for the accepted object shapes.

persistentCache?: FeatureFlarePersistentCacheAdapter

Optional adapter to persist flag cache across browser sessions. See FeatureFlarePersistentCacheAdapter for the required load/save contract.

Startup and Instrumentation

waitForFlags?: boolean

When true, initial render is delayed until first flag snapshot is available.

waitForFlagAuth?: boolean

Deprecated alias for waitForFlags.

Realtime Options

realtime?.enabled?: boolean

Enable realtime transport behavior.

realtime?.pollingIntervalMs?: number

Polling fallback interval when streaming is unavailable.

realtime?.ssePath?: string

Optional SSE endpoint path override.

realtime?.disconnectWhenHidden?: boolean

Pause realtime connection while document is hidden.

Related docs