Skip to content

Commit dc5a2ea

Browse files
authored
Merge pull request #132 from splitio/SDKS-6940
[SDKS-6940][DW] Update README
2 parents a3a0c61 + 7c514e6 commit dc5a2ea

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ function MyReactComponent() {
3434
return (
3535
/* Use SplitFactory to instantiate the SDK and makes it available to nested components */
3636
<SplitFactory config={CONFIG} >
37-
{/* Evaluate splits with SplitTreatments component */}
38-
<SplitTreatments names={['SPLIT_NAME']} >
39-
{({ treatments: { SPLIT_NAME }, isReady }) => {
37+
{/* Evaluate feature flags with SplitTreatments component */}
38+
<SplitTreatments names={['FEATURE_FLAG_NAME']} >
39+
{({ treatments: { FEATURE_FLAG_NAME }, isReady }) => {
4040
// Check SDK readiness using isReady prop
4141
if (!isReady)
4242
return <div>Loading SDK ...</div>;
43-
if (SPLIT_NAME.treatment === 'on') {
43+
if (FEATURE_FLAG_NAME.treatment === 'on') {
4444
// return JSX for on treatment
45-
} else if (SPLIT_NAME.treatment === 'off') {
45+
} else if (FEATURE_FLAG_NAME.treatment === 'off') {
4646
// return JSX for off treatment
4747
} else {
4848
// return JSX for control treatment

0 commit comments

Comments
 (0)