@usechatting/react-native
v0.1.4
Published
React Native and Expo visitor chat SDK for Chatting.
Readme
@usechatting/react-native
Add Chatting customer support to an Expo or React Native app.
Install
npm install @usechatting/react-nativeGet your site ID
Open Widget → Installation in Chatting and copy the data-site-id value.
Add the support screen
import {
ChattingClient,
ChattingConversationScreen
} from "@usechatting/react-native";
const client = new ChattingClient({
siteId: "your-site-id"
});
export function SupportScreen() {
return <ChattingConversationScreen client={client} />;
}Messages sent here appear in your Chatting inbox. Team replies appear in the app while the screen is open.
Keep conversations after the app closes
Add persistSession: true so customers can reopen the same conversation later:
import { ChattingClient } from "@usechatting/react-native";
const client = new ChattingClient({
siteId: "your-site-id",
persistSession: true
});Optional features
- Pass a signed-in customer to the screen with
profile={signedInCustomer}. - Register an Expo push token if customers should receive phone notifications when your team replies and the app is not open.
- Use
useChattingConversationinstead of the ready-made screen if you want to build your own interface.
See the complete setup guide.
