- React
- JS snippet
- Python
- Node
- +24 more SDKs
1
Install Statsig packages
2
Wrap child components
Next, update your app’s default function so that the StatsigProvider wraps around all child components.
This example assumes you’re using client-side React, if you’re Server-Side Rendering, you’d be better served by our Next.js docs.
3
Add client key
Create a client API key in the Statsig console Settings. Copy and paste it to replace
<REPLACE_WITH_YOUR_CLIENT_KEY>
in the code snippet from the previous step.4
Basic Usage
- Check a Gate
- Get an Experiment Value
- Log an Event
First, create a gate on the Feature Gates page in console, then check it in-code: