SideKit React Native SDK for version gating and analytics
npm install @sidekit/react-native
![]()



SideKit is a lightweight React Native SDK that provides seamless version gating and analytics for your mobile applications. Ensure your users are always on the right version and gain insights into app usage with minimal setup.
- Version Gating: Remotely force updates or suggest new versions to your users.
- Analytics Signals: Send custom events (signals) to track user behavior and app health.
- Automatic Presentation: Out-of-the-box UI for update prompts that works for both iOS and Android.
- Expo Compatible: Works with both Expo and bare React Native
``bash`
npm install @sidekit/react-native @react-native-async-storage/async-storageor
yarn add @sidekit/react-native @react-native-async-storage/async-storage
Wrap your app with SideKitProvider:
`typescript
import { SideKitProvider } from '@sidekit/react-native';
function App() {
return (
);
}
`
By default, SideKit handles version gating automatically if presentationMode is set to 'automatic'. It checks for updates on app launch and whenever the app returns to the foreground.
If you prefer manual control:
`ts
const { showUpdateScreen, gateInformation } = useSideKit();
{showUpdateScreen && gateInformation && (
{/ Show your custom update UI /}
)}
`
Send signals to track important events in your app:
`ts
const { sendSignal, sendSignals } = useSideKit();
// Send a simple signal
sendSignal("user_signed_up")
// Send a signal with a value
sendSignal("purchase", "pro_plan")
// Send multiple signals at once (more efficient)
sendSignals([
{ key: "page_view", value: "home" },
{ key: "button_clicked", value: "signup" },
{ key: "feature_used", value: "dark_mode" }
])
`
Allow users to control analytics collection. If it's turned off you will no longer have signal data from users with analytics disabled. Version gating will be uninterrupted.
`ts
const { isAnalyticsEnabled, setAnalyticsEnabled } = useSideKit();
onValueChange={setAnalyticsEnabled}
/>
`
The preference is automatically persisted across app launches.
A comprehensive example app is included in the example/ directory, demonstrating all SDK features:
`bash``
cd example
npm install
npm start
- React Native 0.70.0 or higher
- React 18.0.0 or higher
- @react-native-async-storage/async-storage 1.21.0 or higher (optional)
SideKit is available under the MIT license. See the LICENSE file for more info.
Contributions are welcome! Please read CONTRIBUTING.md to get started.