The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.
Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Install the React SDK

Steps to install the Optimizely Feature Experimentation React SDK into your application.

The React SDK is distributed through npm. Add it to your package with NPM:

npm install --save @optimizely/react-sdk

or with Yarn:

yarn add @optimizely/react-sdk

The full source code is at https://github.com/optimizely/react-sdk.

Requirements

RequirementVersion
React>= 16.8.0
Node.js>= 18.0.0
Module formatESM only

The React SDK v4 is distributed as ESM only. If your project uses CommonJS (require()), you need to switch to ESM imports or configure your bundler to handle ESM dependencies.