Unleash is a private, secure, and scalable feature management platform built to reduce the risk of releasing new features and accelerate software development. This React Native / Expo SDK is designed to help you integrate with Unleash and evaluate feature flags inside your application.
You can use this SDK with Unleash Enterprise or Unleash Open Source.
Full documentation: https://docs.getunleash.io/sdks/react-native
npm install @unleash/unleash-react-native-sdk unleash-proxy-clientyarn add @unleash/unleash-react-native-sdk unleash-proxy-clientnpx expo install @unleash/unleash-react-native-sdk unleash-proxy-clientimport { FlagProvider, useFlag } from '@unleash/unleash-react-native-sdk';
const config = {
url: 'https://<your-unleash-instance>/api/frontend',
clientKey: '<your-frontend-token>',
appName: 'my-app',
};
function MyComponent() {
const isEnabled = useFlag('my-feature');
return isEnabled ? <NewFeature /> : <OldFeature />;
}
export default function App() {
return (
<FlagProvider config={config}>
<MyComponent />
</FlagProvider>
);
}For configuration options, context management, bootstrapping, testing, and troubleshooting, see the full documentation.
- Node.js 18 or later
- Yarn
git clone https://github.com/Unleash/unleash-react-native-sdk.git
cd unleash-react-native-sdk
yarn installyarn testyarn buildSee the Unleash contribution guide for general guidelines.
Releases are published to npm under the @unleash scope.
Apache-2.0