Skip to content

DoCurious API Reference / store / selectFlagByKey

Function: selectFlagByKey()

selectFlagByKey(key): (state) => FeatureFlag | null

Defined in: store/useFeatureFlagStore.ts:390

Create a selector for a single flag by its unique key.

Parameters

key

string

The flag key to look up (e.g., 'wallet_v2')

Returns

Selector returning the flag or null if not found

(state): FeatureFlag | null

Parameters

state

FeatureFlagStore

Returns

FeatureFlag | null

Example

ts
const darkModeFlag = useFeatureFlagStore(selectFlagByKey('dark_mode'))

DoCurious Platform Documentation