Releases: statsig-io/react-sdk
v1.27.1 - Delay PrefetchUsers for Bootstrap
- Moves prefetchUsers call to delayedSetup in the Bootstrap flow when it is provided via StatsigOptions.prefetchUsers.
- Only applies if initializing with StatsigOptions.initializeValues
v1.27.0 - Add StatsigOptions.updateUserCompletionCallback
Adds StatsigOptions.updateUserCompletionCallback
. You can set this callback function if you wish to know when a call to Statsig.updateUser has been completed
v1.26.0 - Add FetchMode
Adds StatsigOptions.fetchMode
. Setting this option will change the behavior of UpdateUser calls.
The supported FetchModes are as follows:
network-only
- This is the default behavior. The SDK will always fetch the latest feature gate and experiment values from the Statsig servers when Statsig.updateUser is called.
cache-or-network
- When set to this mode, the SDK will first check if a cached value exists for the user and was cached during this session (After Statsig.initialize). If no valid cache value is found, a network request will be made to fetch the latest values.
v1.24.0 - Improves performance of StatsigSynchronousProvider
Improves the synchronous initialization path (when initializeValues are provided) by removing or moving calls to local storage.
Also introduces disableLocalOverrides
as a StatsigOption
, which disables local storage loading local overrides for additional performance improvements.
v1.23.2 - Fixes updateUser in StatsigSynchronousProvider
Patches a bug with the StatsigSynchronousProvider
where, after the initial render, if the user was updated, the initializeValues
property would remain the values for evaluation, while the user object itself would change.
We also improved the BootstrapValidator
logic to catch more cases of a mismatch between the user used to generate initializeValues
and the user that is set on the SDK. Note that this changes the evaluation reason to InvalidBootstrap if it detects that, but it only looks at changes to evaluation IDs - userID or customIDs
v1.23.1 - issue initCompletionCallback only on first initialize
Merge pull request #10 from statsig-io/singleinitcallback Patch: issue single initCallback
v1.23.0 - Improve initialize metadata apis
internal js sdk updates: https://github.com/statsig-io/js-client/releases/tag/v4.30.0
Trigger the initCompletionCallback from setInitializeValues - used when synchronously intiializing the SDK. Also prefers performance.now() when available in the browser to Date.now() for measuring the time returned in initCompletionCallback
Internal updates:
send event log failure telemetry to a different endpoint for better redundancy.
update eval reason when cached values are up to date
dont rotate session id on update user
v1.22.0 - performance fixes, context updates,
performance fixes for contexts - previously anytime this component re-rendered (i.e. its parent rerendered), the context value would update causing all components with a useGate hook to rerender too, which isn't really necessary
context updates for overrides - #7
add shutdownOnUnmount
prop to the StatsigSynchronousProvider
fix typo in removeLayerOverride
(internal) expose statsig on window
v1.21.1 - internal update for react native sdk
patch async storage issue for react native sdk
v1.21.0 - Adds layer overrides, and hooks to check gates/configs/experiments without an automatic exposure log
Introduces
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