Feature SDK implementation
React Native
React-style decisions in native mobile applications.
iOS / Android · ReactThis runtime cannot execute inside a Next.js browser process. The page shows the native, official SDK shape; use the JavaScript, React, or Next.js pages for a live decision and event round trip with the same project, flag, event, and visitor ID.
Implementation
Official docs ↗npm install @optimizely/react-sdk
const [decision] = useDecision('demo_flag');
const user = useOptimizelyUser();
return <Button onPress={() => user.trackEvent('demo_purchase')} />;