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

# Feature Flags

# Feature Flags

The `useFeatureFlags` hook provides boolean toggles for remote feature control. Features can be enabled or disabled from the Stackfront dashboard without deploying a new app version.

## Usage

```tsx theme={null}
import { useFeatureFlags } from 'react-native-stackfront-sdk';

function ConditionallyShowFeatures() {
  const flags = useFeatureFlags();

  return (
    <View>
      {flags?.storiesEnabled && <StoryHighlights />}
      {flags?.loyaltyEnabled && <LoyaltyCard />}
      {flags?.reviewsEnabled && <ReviewSummary />}
      {flags?.wishlistEnabled && <WishlistButton />}
      {flags?.announcementsEnabled && <AnnouncementBar />}
      {flags?.popupsEnabled && <PopupHandler />}
      {flags?.abandonedCartEnabled && <AbandonedCartReminder />}
      {flags?.liveVisitorCountEnabled && <VisitorCounter />}
      {flags?.recentPurchasePopupEnabled && <RecentPurchaseToast />}
    </View>
  );
}
```

## Hook API

```ts theme={null}
function useFeatureFlags(): SdkFeatureFlags | null
```

## Available Flags

| Flag                         | Description                              |
| ---------------------------- | ---------------------------------------- |
| `storiesEnabled`             | Story highlights carousel                |
| `loyaltyEnabled`             | Loyalty points and tiers                 |
| `reviewsEnabled`             | Product reviews                          |
| `wishlistEnabled`            | Local wishlist                           |
| `announcementsEnabled`       | Announcement bar                         |
| `popupsEnabled`              | On-screen popups                         |
| `abandonedCartEnabled`       | Abandoned cart push notifications        |
| `liveVisitorCountEnabled`    | Live visitor count display               |
| `recentPurchasePopupEnabled` | Recent purchase notifications            |
| `subscriptionsEnabled`       | Subscription/recurring purchase features |

All flags default to `false` when the config hasn't loaded yet.
