Last active
September 10, 2019 18:57
-
-
Save asaschachar/2a12b28bbfeb45c0346f31c4cb012649 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
createInstance, | |
OptimizelyProvider, | |
} from '@optimizely/react-sdk' | |
const optimizely = createInstance({ | |
sdkKey: '<Your_SDK_Key>', | |
}) | |
class App extends React.Component { | |
render() { | |
return ( | |
<OptimizelyProvider | |
optimizely={optimizely} | |
user={{ | |
id: 'user123', | |
attributes: { | |
'customerId': 123, | |
'isVip': true, | |
} | |
}}> | |
<h1>Example Application</h1> | |
<div> | |
No features here yet... | |
</div> | |
</OptimizelyProvider> | |
) | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment