Skip to content

Commit c4afe04

Browse files
authored
fix: updated datafile variable in README (#224)
1 parent 380a1d8 commit c4afe04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ _returns_
8989
import { OptimizelyProvider, createInstance } from '@optimizely/react-sdk';
9090

9191
const optimizely = createInstance({
92-
datafile: window.datafile,
92+
datafile: window.optimizelyDatafile,
9393
});
9494
```
9595

@@ -118,7 +118,7 @@ Synchronous loading is the preferred method to ensure that Optimizely is always
118118
import { OptimizelyProvider, createInstance } from '@optimizely/react-sdk';
119119

120120
const optimizelyClient = createInstance({
121-
datafile: window.datafile,
121+
datafile: window.optimizelyDatafile,
122122
sdkKey: 'your-optimizely-sdk-key', // Optimizely environment key
123123
});
124124

@@ -179,7 +179,7 @@ import { OptimizelyProvider, createInstance } from '@optimizely/react-sdk';
179179
import { fetchUser } from './user';
180180

181181
const optimizely = createInstance({
182-
datafile: window.datafile,
182+
datafile: window.optimizelyDatafile,
183183
});
184184

185185
const userPromise = fetchUser(); // fetchUser returns a Promise for an object with { id, attributes }
@@ -457,7 +457,7 @@ To disable sending all events to Optimizely's results backend, use the `logOnlyE
457457
import { createInstance, logOnlyEventDispatcher } from '@optimizely/react-sdk';
458458

459459
const optimizely = createInstance({
460-
datafile: window.datafile,
460+
datafile: window.optimizelyDatafile,
461461
eventDispatcher: logOnlyEventDispatcher,
462462
});
463463
```

0 commit comments

Comments
 (0)