Releases: statsig-io/js-client-monorepo
3.0.0 - Split out StatsigClient and StatsigOnDeviceClient
Warning
Contains the following breaking changes
- Makes ReactNative storage default to @react-native-async-storage/async-storage
- Moves support for StatsigOnDeviceEvalClient to its own packages
Overview
Creates a hard divide between Statsig with precomputed remote evaluations (the standard StatsigClient
) and Statsig with on-device evaluations (StatsigOnDeviceEvalClient
). Now we offer specific packages for the combination of client type and environment/framework.
These changes make it easier to offer out-of-the-box solutions for initializing the Statsig client as we can now have a hard dependency on @statsig/js-client
and @statsig/js-on-device-eval-client
.
Note: StatsigOnDeviceEvalClient
no longer works in @statsig/react-bindings
as support has been moved into the new @statsig/react-bindings-on-device-eval
Storage Providers
We recently switched to using MMKV as the default storage solution. Based on developer feedback, we have decided to make this an opt-in change rather than the default. This release switches back to the AsyncStorage approach. If you would like to use MMKV, you can now override the StorageProvider (See https://docs.statsig.com/client/javascript-sdk/react-native#synchronous-storage-with-mmkv).
Changelog
Adds new packages specifically for StatsigOnDeviceEvalClient in React, RN and Expo.
@statsig/react-bindings-on-device-eval
8c1353c@statsig/react-native-bindings-on-device-eval
8c1353c@statsig/expo-bindings-on-device-eval
a447a42
@statsig/js-client
@statsig/js-on-deivce-eval-client
- chore: expose StorageProvider on clients c389725
@statsig/web-analytics
- feat: autocapture network strength 10f63c2
@statsig/expo-bindings
@statsig/react-native-bindings
- feat: add env specific clients for Expo and RN f9f62ba
- This change means you no longer need to be in the React tree to use a StatsigClient in Expo and RN
2.1.0 - Init through StatsigProvider
- Move MMKV dependency to "peerDependencies", allowing 2.0 and 3.0 versions.
- Add ability to initialize a StatsigClient automatically through StatsigProvider
Changelog
repo
- chore: update min fast-loops version 1048b98
@statsig/client-core
- chore: update diagnostics 4c0b077
@statsig/js-client
@statsig/js-on-device-eval-client
- feat: add option to disable bg network request 6dc0b5c
@statsig/js-local-overrides
- feat: methods for removing single overrides c7be2c7
@statsig/react-bindings
- feat: init client through StatsigProvider 887a535
@statsig/expo-bindings
@statsig/react-native-bindings
- chore: chore: allow 2.x and 3.x mmkv version e1ddb2c
2.0.0 - Synchronous Storage for React Native
Warning
Contains the following breaking changes
- Makes ReactNative storage synchronous
- Removes
warmCachingFromAsyncStorage
and thecacheWarming
prop fromStatsigProviderRN
/StatsigProviderExpo
- Removes
StatsigClient.getAsyncContext
Add new hooks useClientAsyncInit
and useClientBootstrapInit
, making it easier to get setup using Statsig in react environments.
In ReactNative environments, we have swapped out @react-native-async-storage/async-storage
for react-native-mmkv
. This now means that we can treat all local storage as synchronous across the SDK, as well as remove the need to warm the caching before calling Statsig in ReactNative.
Example Change:
const client = new StatsigClient(YOU_CLIENT_KEY, user);
// const warming = warmCachingFromAsyncStorage(client); <- No Longer Required
function App(): JSX.Element {
return (
<StatsigProviderRN client={client} /* cacheWarming={warming} <- also removed */>
<Content />
</StatsigProviderRN>
);
}
@statsig/js-client
- chore: deprecate getAsyncContext 48db8af
- feat(internal): add
statsig::diagnostics
tracking to initialization e0604dd - chore: only retry on specific http status codes a5ca264
@statsig/web-analytics
- feat: auto capture support disabling events f042c13
@statsig/react-bindings
- feat: add react hooks for client initialization af8f6be
@statsig/react-native-bindings
@statsig/expo-bindings
- feat: changing storageProvider type to sync, use mmkv for storage in RN 815bfdb
1.7.0 - Support React Strict Mode
To better support 'strict-mode' in the newer versions of Next.js (enabled by default in Next.js 13.4), logic has been added to restart the scheduled event logger flush on remount of the StatsigProvider.
Changelog
@statsig/react-bindings
- chore: add better error message noop client usage 61b4e08
- chore: rm auto shutdown in StatsigProvider 9e6a3ef
@statsig/js-client
- feat: expose adapter and overrideadapter 5437af2
@statsig/js-on-device-eval-client
1.6.0 - Session Replay Force Record. statsig-react-bindings prevent unmount
@statsig/react-bindings
- Prevent unmounting when StatsigClient is 'loading'
- Add
StatsigProvider.loadingComponent
. Now only shows loading state ifStatsigProvider.loadingComponent
is set.
@statsig/session-replay
- Add ability to force recording to start via
runStatsigSessionReplay(client, { forceRecording: true })
v1.5.0 - add getAllOverrides/removeAllOverrides
Changelog
@statsig/web-analytics
- 5901129 feat: allow overriding of api endpoint & capture dataset
@statsig/js-client
- 35cc6fd fix: ensure environment is set on prefetch
@statsig/js-local-overrides
- 480a894 feat: add getAllOverrides/removeAllOverrides
@statsig/react-bindings
- fe477b4 chore: memoize StatsigProvider context value
1.4.0 - expo-device@6 support. hostname & pathname in events
1.3.1 - Re-enables Deltas Support. Fix background flushing in React Native
1.3.0 - Fix Experiment.groupName
1.2.0 - Removes GZIP compression for /rgstr calls
- /rgstr compression is leading to performance issues. Removing completely until they are resolved.