Skip to content

Releases: statsig-io/react-native-expo

v4.7.2 - bump dependency versions

Choose a tag to compare

@tore-statsig tore-statsig released this 11 Jun 19:27
47be5d4

Resolving security warnings on dependencies

v4.7.1 - move expo- dependencies to peer dependencies

Choose a tag to compare

@tore-statsig tore-statsig released this 07 Jun 23:19
e19c637

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

Choose a tag to compare

@tore-statsig tore-statsig released this 05 Apr 23:25
efba807

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

https://docs.statsig.com/client/javascript-sdk/expo

v4.6.1 - patches issue were an extra refresh needed to be triggered

Choose a tag to compare

@tore-statsig tore-statsig released this 01 Dec 23:58
e2b9f7a

Patches an issue where initialize values were not immediately usable without an extra rerender

v4.6.0 - Upgrades to statsig-react 1.21.0

Choose a tag to compare

@tore-statsig tore-statsig released this 28 Nov 18:00
5df9983

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

Choose a tag to compare

@tore-statsig tore-statsig released this 18 Mar 20:58

Bump expo-device version for expo 44 support

v4.4.1 - Support expo 44

Choose a tag to compare

@tore-statsig tore-statsig released this 10 Mar 21:30
3ee009d

Fixes #1 so the SDK is compatible with expo 44

v4.4.0 - Add support for initializing Statsig outside a component tree

Choose a tag to compare

@tore-statsig tore-statsig released this 08 Mar 22:58
9def61d

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

Choose a tag to compare

@tore-statsig tore-statsig released this 22 Feb 19:04
c2b6b93

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

Choose a tag to compare

@jkw-statsig jkw-statsig released this 08 Dec 21:24
e089f64

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.