@checkgate/react-native
v0.1.16
Published
Checkgate feature-flag SDK for React Native — local evaluation via Rust JSI.
Maintainers
Readme
@checkgate/react-native
Checkgate React Native SDK (JSI) — The official high-performance mobile client for Checkgate. Powered by a direct JSI (JavaScript Interface) natively bridging to Rust, this SDK completely avoids strictly serialized asynchronous React Native bridge delays, allowing sub-microsecond synchronous feature toggle evaluations natively on device.
Installation
npm install @checkgate/react-native
# iOS requires pod installation
cd ios && pod installQuick Start
Plug the incredibly fast evaluating CheckgateProvider context or native clients directly into your React Native app.
import { CheckgateNativeClient } from '@checkgate/react-native'
const client = new CheckgateNativeClient({
serverUrl: 'https://checkgate.your-company.com',
sdkKey: 'pk_mobile_xxxxxx'
})
// Run this during app initialization
client.connect()
// Later natively inside your RN component lifecycle
function CheckoutScreen({ user }) {
const showApplePay = client.isEnabled('apple-pay-checkout', user.id, { plan: user.plan })
return showApplePay ? <ApplePayButton /> : <StandardCheckout />
}Why Checkgate JSI?
- Synchronous Native Bridge: Unlike standard HTTP wrappers, Checkgate's JSI evaluates flag arrays in memory avoiding async JS bridge loading.
- Bandwidth Conscious: Streamlined SSE prevents apps from polling the network heavily on metered mobile plans.
Browse the official Checkgate documentation for architecture schemas and more.
