> ## Documentation Index
> Fetch the complete documentation index at: https://superflag.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the Superflag React Native SDK for Expo and React Native

# React Native SDK Installation

The `@superflag-sh/react-native` package provides feature flags and remote config for React Native and Expo applications.

## Requirements

* React Native 0.70+
* React 18 or higher
* Expo SDK 49+ (if using Expo)
* `@react-native-async-storage/async-storage` 1.0+

## Installation

<Tabs>
  <Tab title="Expo">
    ```bash theme={null}
    npx expo install @superflag-sh/react-native @react-native-async-storage/async-storage
    ```
  </Tab>

  <Tab title="React Native CLI">
    ```bash npm theme={null}
    npm install @superflag-sh/react-native @react-native-async-storage/async-storage
    ```

    ```bash yarn theme={null}
    yarn add @superflag-sh/react-native @react-native-async-storage/async-storage
    ```

    ```bash pnpm theme={null}
    pnpm add @superflag-sh/react-native @react-native-async-storage/async-storage
    ```

    Then link AsyncStorage (if not using autolinking):

    ```bash theme={null}
    cd ios && pod install && cd ..
    ```
  </Tab>
</Tabs>

<Warning>
  **AsyncStorage is required.** The React Native SDK needs AsyncStorage for persistent caching. Make sure to install `@react-native-async-storage/async-storage`.
</Warning>

## Platform Support

The React Native SDK works on:

* **iOS** (14.0+)
* **Android** (API 21+)
* **Expo** (SDK 49+)

## Bundle Size

* **\~6 KB** minified (gzipped)
* **Zero dependencies** (except peer deps: React, AsyncStorage)
* Fully tree-shakeable ES modules

## TypeScript Support

The SDK is written in TypeScript with full type definitions included.

```tsx theme={null}
import { useFlag } from '@superflag-sh/react-native'

// Type-safe hooks
const enabled = useFlag<boolean>('feature-flag', false)
const config = useFlag<{ theme: string }>('ui-config', { theme: 'light' })
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Usage Guide" icon="code" href="/react-native/usage">
    Learn how to use the SDK in your app
  </Card>

  <Card title="API Reference" icon="book" href="/react-native/api-reference">
    Complete API documentation
  </Card>
</CardGroup>
