Skip to content
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-native

Add the provider #

Wrap your app once, near the root. Pass your public key (pk_live_…) from Settings → API keys, and whoever is signed in.

TSX
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 #

TSX
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>
  );
}
CallOpens
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.

Bash
npx expo install @react-native-async-storage/async-storage
TSX
import 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
publicKeyYour workspace's public key (pk_live_…)
userWhoever is signed in, or null when nobody is
storageOptional. Anything with async getItem / setItem / removeItem, such as AsyncStorage
localeOptional. Pin a language, for example "tr"
colorSchemeOptional. "light" or "dark" instead of following the phone
onErrorCalled 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 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.