Releases: statsig-io/react-native-expo
Release list
v4.7.2 - bump dependency versions
Resolving security warnings on dependencies
v4.7.1 - move expo- dependencies to peer dependencies
expo-constants and expo-device were incorrectly listed under dependencies of the package, when they are peer dependencies that we should inherit from the hosting app
Important
This version of the SDK is now in maintainance mode and will only receive bug fixes.
All new features will be added to the @statsig/js-client and @statsig/expo-bindings packages.
Users of the statsig-react-native-expo npm package should migrate to the @statsig/js-client and @statsig/expo-bindings packages by 1/31/2025 - see this guide.
v4.7.0 - fix expo dependency versions, bump internal react version
The sdk is now pegged to specific react sdk versions - it has been updated to react v1.38.0
This sdk will soon be deprecated in favor of @statsig/expo-bindings combined with @statsig/js-client
v4.6.1 - patches issue were an extra refresh needed to be triggered
Patches an issue where initialize values were not immediately usable without an extra rerender
v4.6.0 - Upgrades to statsig-react 1.21.0
Includes bug fixes for invalid hook calls
Introduces new APIs:
useGateWithExposureLoggingDisabled
useConfigWithExposureLoggingDisabled
useExperimentWithExposureLoggingDisabled
useLayerWithExposureLoggingDisabled
These apis take the same parameters as the normal gate/config/experiment/layer hooks, only they do not trigger an exposure log
Also adds the overrideLayer method on the Statsig class for mocking layers
overrideLayer(layerName: string, value: object): void
Adds the following props to the StatsigProvider:
/**
* A key for stable mounting/unmounting when updating the user. If this key is set and changes when the user object changes
* (or if it is not provided) Then the children of StatsigProvider will unmount/remount with the async update.
* If this key is set and does not change, then the children of StatsigProvider will continue to be mounted,
* and it will trigger a rerender after updateUser completes
*/
mountKey?: string;
// If set to true, will automatically call Statsig.shutdown() when the provider is unmounted
shutdownOnUnmount?: boolean;
v4.4.2 - Support expo 44 with expo-device
Bump expo-device version for expo 44 support
v4.4.1 - Support expo 44
Fixes #1 so the SDK is compatible with expo 44
v4.4.0 - Add support for initializing Statsig outside a component tree
Statsig.initialize will now correctly setup the SDK with react native specific dependencies when initializing outside the component tree.
See https://docs.statsig.com/client/reactSDK#custom-initialization for more information
v4.3.0 - Adds support for automatic error logging, removes duplicate exposure logs
Introduces automatic error logging, which can be disabled via a new StatsigOption parameter disableErrorLogging
Fixes an issue where the same check would trigger multiple exposure logs.
These updates come from updating the core statsig-js sdk. See also:
See also https://github.com/statsig-io/js-client/releases/tag/v4.11.0
v4.2.0 - Added optional TypeGuard to DynamicConfig get method
In this release we are adding an optional TypeGuard parameter to the get<T> method on DynamicConfig class, so that users can use their own TypeGuard functions to ensure type correctness. Thanks to Statsig user @bilalq for his idea and contribution on this!
interface Thing {
category: 'real' | 'imaginary'
}
const isThing = (obj: any): obj is Thing => {
return obj?.category === 'real' || obj?.category === 'imaginary'
}
...
const config = useConfig('my_config');
const defaultThing: Thing = { category: 'real' };
const myThing = config.get('my_thing', defaultThing, isThing);
// myThing is now guaranteed to be a Thing, instead of any kind of object.