# @wherdkit/react-native

Wherd SDK for **Expo & React Native** — drop-in in-app feedback, feature voting,
and a "What's New" changelog. FAB, shake-to-open, themeable, headless escape hatch.

```bash
# Expo
npx expo install @wherdkit/react-native @react-native-async-storage/async-storage
# (optional) shake-to-open
npx expo install expo-sensors
# (optional) native bottom-sheet presentation
npx expo install @lodev09/react-native-true-sheet
# (optional) live updates over SSE
npx expo install react-native-sse
```

`@react-native-async-storage/async-storage` is a required peer (used to persist
the anonymous id + offline queue). Two peers are optional:

- **`expo-sensors`** — powers shake-to-open; without it, shake activation is a no-op.
- **`@lodev09/react-native-true-sheet`** — presents the panel as a native
  bottom-sheet (correct safe-area insets + keyboard handling, no Android
  clipping). Without it, the panel falls back to a React Native `<Modal>`.
- **`react-native-sse`** — enables live updates (SSE). Without it, the SDK stays
  pull-only (refetches on panel open + app foreground).

## Quick start

```tsx
import { WherdProvider, MessagesWidget } from "@wherdkit/react-native";

export default function App() {
  return (
    <WherdProvider
      publicKey="pk_your_key"
      apiUrl="https://api.wherd.io"
      activation={{ fab: true, shake: true }}
      user={{ id: "user_123", name: "Ada" }} // optional
    >
      <YourApp />
      <MessagesWidget />
    </WherdProvider>
  );
}
```

## Components & hooks

Same surface as `@wherdkit/react`: `<MessagesWidget />`, `<MessagesFAB />`,
`<FeatureBoard />`, `<WhatsNew />`, and the headless hooks `useWherd`,
`useComposer`, `useFeatureRequests`, `useChangelog`, `useUnreadChangelog`,
`useResolvedTheme`.

Works in Expo (managed + dev builds) and bare React Native. Pure JS — no native
modules required for the core experience.

MIT licensed. Part of [Wherd](https://github.com/wherdhq/wherd).
