React Native & Expo
Add Helpway in-app support to a React Native or Expo app: open the messenger as a native sheet from your own Help button, with an unread badge and per-user conversations.
On this page
@helpway/react-native brings Helpway into your mobile app. There is no floating chat bubble: your app opens the messenger from its own Help or Contact support entry, and it slides up as a sheet.
It works in Expo Go. The only native module it needs is react-native-webview, which Expo already ships.
Install #
npx expo install react-native-webview
npm install @helpway/react-nativeAdd the provider #
Wrap your app once, near the root. Pass your public key (pk_live_…) from Settings → API keys, and whoever is signed in.
import { HelpwayProvider } from "@helpway/react-native";
export default function App() {
const user = useCurrentUser(); // your own auth
return (
<HelpwayProvider
publicKey="pk_live_..."
user={user ? { externalId: user.id, email: user.email, name: user.name } : null}
onError={(reason) => console.warn("Helpway:", reason)}
>
<Navigation />
</HelpwayProvider>
);
}Open it from your own UI #
import { useHelpway, useHelpwayUnread } from "@helpway/react-native";
function HelpRow() {
const helpway = useHelpway();
const unread = useHelpwayUnread(); // null until known
return (
<Pressable onPress={helpway.present}>
<Text>Help{unread ? ` (${unread})` : ""}</Text>
</Pressable>
);
}| Call | Opens |
|---|---|
present() | the messenger's home |
presentComposer(text?) | a new conversation, with text already typed |
presentConversation(id) | one conversation, e.g. from a notification |
dismiss() | closes the sheet |
A badge before the first open #
Pass storage and the SDK keeps this app's visitor on the device. It then asks for the unread count on its own, at launch and whenever the app comes back to the foreground, so the badge is correct before anyone has tapped Help.
npx expo install @react-native-async-storage/async-storageimport AsyncStorage from "@react-native-async-storage/async-storage";
<HelpwayProvider publicKey="pk_live_..." storage={AsyncStorage}>Without storage, useHelpwayUnread() is null until the sheet has been opened once. Draw no badge on null: a 0 that isn't true tells someone their question was answered when it wasn't.
Props #
| Prop | |
|---|---|
publicKey | Your workspace's public key (pk_live_…) |
user | Whoever is signed in, or null when nobody is |
storage | Optional. Anything with async getItem / setItem / removeItem, such as AsyncStorage |
locale | Optional. Pin a language, for example "tr" |
colorScheme | Optional. "light" or "dark" instead of following the phone |
onError | Called when the messenger can't open or reports a problem |
Signing in and out #
Pass user whenever someone is signed in, and null when nobody is. When it changes, the SDK forgets the previous person, so the next person on the same phone never sees the last one's conversations. Someone who chats while signed out and then signs in keeps that conversation: it becomes theirs.
If the switch can't be made safely (for example, the device is offline), the sheet closes and onError is called rather than opening for the wrong person.
The fields are the same as the web widget's identify(). See Visitor identity.
In your inbox #
Conversations started from the app say so. The person's page shows Reached us from · Your mobile app, and the AI knows it's talking to someone in an app, so it describes what to tap by name, not by position on a page.
Links and text #
Links in a conversation that point outside Helpway, such as your docs or a file, open in the system browser, not inside the sheet.
The SDK shows no text of its own. The messenger follows your workspace's languages. Failures go to onError, so you can explain them in your own words.