Skip to content

Commit d7cac9a

Browse files
authored
update: Updated the Readme (#107)
* incorporated review feedback by frances * incorporate feedback
1 parent d49ab4c commit d7cac9a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Optimizely Rollouts is free feature flags for development teams. Easily roll out
1212
- User ID + attributes memoization
1313
- Render blocking until datafile is ready via a React API
1414
- Optimizely timeout (only block rendering up to the number of milliseconds you specify)
15-
- Library of React components to use with [feature flags](https://docs.developers.optimizely.com/full-stack/docs/use-feature-flags) and [A/B tests](https://docs.developers.optimizely.com/full-stack/docs/run-a-b-tests)
15+
- Library of React components and hooks to use with [feature flags](https://docs.developers.optimizely.com/full-stack/v4.0/docs/create-feature-flags)
1616

1717
### Compatibility
1818

@@ -36,8 +36,8 @@ function MyComponent() {
3636
return (
3737
<React.Fragment>
3838
<SearchComponent algorithm={decision.variables.algorithm} />
39-
{ decision.variationKey === 'bluebutton' && <BlueButton /> }
40-
{ decision.variationKey === 'greenbutton' && <GreenButton /> }
39+
{ decision.variationKey === 'relevant_first' && <RelevantFirstList /> }
40+
{ decision.variationKey === 'recent_first' && <RecentFirstList /> }
4141
</React.Fragment>
4242
);
4343
}
@@ -80,8 +80,8 @@ The `ReactSDKClient` client created via `createInstance` is the programmatic API
8080
_arguments_
8181

8282
- `config : object` Object with SDK configuration parameters. This has the same format as the object passed to the `createInstance` method of the core `@optimizely/javascript-sdk` module. For details on this object, see the following pages from the developer docs:
83-
- [Instantiate](https://docs.developers.optimizely.com/full-stack/docs/initialize-sdk-react)
84-
- [JavaScript: Client-side Datafile Management](https://docs.developers.optimizely.com/full-stack/docs/javascript-client-side-implementation)
83+
- [Instantiate](https://docs.developers.optimizely.com/full-stack/v4.0/docs/initialize-sdk-react)
84+
- [JavaScript: Client-side Datafile Management](https://docs.developers.optimizely.com/full-stack/v4.0/docs/javascript-client-side-implementation)
8585

8686
_returns_
8787

@@ -114,13 +114,14 @@ Before rendering real content, both the datafile and the user must be available
114114

115115
#### Load the datafile synchronously
116116

117-
Synchronous loading is the preferred method to ensure that Optimizely is always ready and doesn't add any delay or asynchronous complexity to your application.
117+
Synchronous loading is the preferred method to ensure that Optimizely is always ready and doesn't add any delay or asynchronous complexity to your application. When initializing with both the SDK key and datafile, the SDK will use the given datafile to start, then download the latest version of the datafile in the background.
118118

119119
```jsx
120120
import { OptimizelyProvider, createInstance } from '@optimizely/react-sdk';
121121

122122
const optimizelyClient = createInstance({
123123
datafile: window.datafile,
124+
sdkKey: 'your-optimizely-sdk-key', // Optimizely environment key
124125
});
125126

126127
class AppWrapper extends React.Component {

0 commit comments

Comments
 (0)