React Native SDK enables you to implement AnnounceKit widgets in your React Native mobile apps, so you can increase feature awareness by sharing the latest product updates right inside your app.
With React Native SDK you can use the following AnnounceKit features:
Widgets with Badge Launcher
Segmentation
User Tracking
Installation
Install the SDK:
npm install announcekit-react-native
Also install react-native-webview, which is a required dependency:
npm install react-native-webview
iOS only: Install the native dependencies with CocoaPods:
cd ios && pod install
Quick Start
function App() {
return (
<SafeAreaView style={styles.container}>
<AnnounceKitProvider widget="https://announcekit.co/widgets/v2/4c6CdO">
<WidgetButton />
</AnnounceKitProvider>
</SafeAreaView>
);
}function WidgetButton() {
const unread = useUnreadCount();
const [openWidget] = useWidget(); if (typeof unread === "undefined") return null; return (
<Button
title={`${unread} unread posts`}
onPress={(e) => openWidget()}
/>
);
}
Resources
