Browse documentation
Install hej in Expo
Add native foreground guest text conversations to your Expo iOS or Android host.
Use the source pilot for its supported scope
hej for Expo 0.1.0 is an unreleased source distribution, not an npm release. It calls the hej HTTP API directly and renders React Native controls, with separate guest threads, paginated text history, protected subject/message drafts, exact-payload retries and visible-reply receipts. It targets Expo iOS/Android. It does not include host-signed identity/linking, photos, action execution, remote appearance, surveys/feedback, push or purchase callbacks. Existing unsupported photo/action content shows an explanation. A verified-only app stops with its support-email fallback. Swift remains the fuller client.
Install the actual extracted package
Keep the archive’s packages/expo and examples/expo folders together. In this example, place the extracted root containing packages and examples at vendor/lobby-expo inside your host repository, then install packages/expo from that root. The archive contains source, documentation and tests; it contains no environment files or server credentials. The checked matrix is Expo 58.0.23, React Native 0.88.1, React 19.3.0, SecureStore 58.0.2, safe-area-context 5.11.1 and TypeScript 6.0.3. Check the existing host’s compatibility before upgrading it; do not force this matrix onto an older app. Browser and plaintext AsyncStorage integrations are not supported.
npm install ./vendor/lobby-expo/packages/expo
npx expo install expo-crypto expo-secure-store react-native-safe-area-context
npx expo install --checkOpen Help from your existing navigation
Retain the client outside rendering and use your app’s actual HTTPS origin, public configuration ID and explicit development or production environment. Keep one SafeAreaProvider around the existing host navigation. Put LobbyHelp in the existing Help route and pass its real focus state: visible must be false whenever another screen covers it. The host owns the route title, colors, login, notification policy and purchase handlers. Constructing the client makes no request; opening Help registers a guest. Neither the public ID nor a display label proves customer identity. A production ID or installed package grants no production entitlement.
import { createExpoLobbyClient, LobbyHelp } from '@lobby/expo';
// Retain once for this app/environment; public setup values only.
const support = createExpoLobbyClient({
baseURL: 'https://YOUR_LOBBY_ORIGIN',
configId: 'YOUR_PUBLIC_DEVELOPMENT_ID',
environment: 'development',
});
export function HelpScreen({ focused }: { focused: boolean }) {
return <LobbyHelp client={support} visible={focused} />;
}Keep account changes and retries explicit
Before logout or a host account switch, close Help and await support.reset(). A successful reset saves a protected tombstone, clears private drafts/access and retains failed session revocations for retry; it does not delete server history. Keep Help closed and retry if protected clearing fails. Configuration and restored sessions must match the same app/environment. Every content attempt saves its complete body, route, request key and customer/session scope before dispatch. Retry saved request reuses that exact attempt across relaunch, while a newer private draft stays separate. Definite errors preserve drafts. Registration and rotating refresh currently have no replay contract; uncertain connection transitions stop instead of silently creating another guest. Copy unsent text and contact support before resetting a session whose history matters.
// In the host account-change flow, before exposing the next account:
await support.reset();Verify your installed host
Open Help with a development configuration, send a synthetic question, reply from that app/environment in the hej inbox and keep the reply visible for at least half a second. Foreground polling refreshes text; it does not establish background delivery. Fetch and visible display have separate receipts. The current Expo source passed 21 portable recovery/scope/storage/activity tests, including delayed polling and background renewal races, and one real isolated PostgreSQL customer → operator → reply/receipt roundtrip. A matching standalone host passed dependency/type checks and exported iOS and Android JavaScript/Hermes bundles. These are local API and bundle results, not native compilation, an installed app, a hosted MongoDB conversation or physical-device/provider evidence. Test your actual host, safe areas, large text, RTL, VoiceOver/TalkBack and storage/network failures before customer use.