Skip to content

Commit 2bfce3b

Browse files
authored
Merge pull request #64 from launchdarkly/christie/sc-164023/update-flags-docs-re-casing
Make targetFlags doc more clear
2 parents e3c837e + ea96d5a commit 2bfce3b

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/initLDClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import * as packageInfo from '../package.json';
1111
* @param reactOptions Initialization options for the LaunchDarkly React SDK
1212
* @param options LaunchDarkly initialization options
1313
* @param targetFlags If specified, `launchdarkly-react-client-sdk` will only request and listen to these flags.
14+
* Flag keys must be in their original form as known to LaunchDarkly rather than in their camel-cased form.
1415
*
1516
* @see `ProviderConfig` for more details about the parameters
1617
* @return An initialized client and flags

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export interface ProviderConfig {
6969
/**
7070
* If specified, `launchdarkly-react-client-sdk` will only request and listen to these flags.
7171
* Otherwise, all flags will be requested and listened to.
72+
* Flag keys must be in their original form as known to LaunchDarkly rather than in their camel-cased form.
7273
*/
7374
flags?: LDFlagSet;
7475

src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const getFlattenedFlagsFromChangeset = (
5454
* @param ldClient LaunchDarkly client
5555
* @param reactOptions Initialization options for the LaunchDarkly React SDK
5656
* @param targetFlags If specified, `launchdarkly-react-client-sdk` will only request and listen to these flags.
57+
* Flag keys must be in their original form as known to LaunchDarkly rather than in their camel-cased form.
5758
*
5859
* @returns an `LDFlagSet` with the current flag values from LaunchDarkly filtered by `targetFlags`.
5960
*/

0 commit comments

Comments
 (0)