Fantasma React Native SDK
The React Native SDK lives undersdks/react-native/fantasma-react-native.
Shared ingest and queue behavior lives on the SDK behavior
page.
Public API
new FantasmaClient({ serverUrl, writeKey })track(eventName)flush()clear()close()
Usage
Install
The package name is:- bare React Native support through native module files under
ios/andandroid/ - Expo-managed support through prebuild/dev-client only
- no Expo Go support in v1
React Native-Specific Notes
- The JS layer allows one live
FantasmaClientper process at a time. - Config validation happens synchronously at construction time, while native configure/acquire happens on first use.
- If first native acquire fails, that JS instance auto-closes and frees the slot immediately.
- Destination switching remains supported by closing the current client and creating a new one with a different destination.
- The native iOS and Android SDKs still own queue durability, built-in metadata, blocked-destination handling, and identity rotation.
- React Native inherits the native
platformanddevicemappings, including Apple desktop-classplatform = "macos",device = "desktop".