You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGES.txt
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
2.1.2 (April XX, 2025)
1
+
2.2.0 (April 15, 2025)
2
+
- Added `updateOnSdkUpdate`, `updateOnSdkReady`, `updateOnSdkReadyFromCache` and `updateOnSdkTimedout` props to the `SplitFactoryProvider` component to overwrite the default value (`true`) of the `updateOnSdk<Event>` options in the `useSplitClient` and `useSplitTreatments` hooks.
2
3
- Updated development dependencies to use React v19 and TypeScript v4.5.5 to test compatibility and avoid type conflicts when using the SDK with React v19 types.
// Tests to validate the migration from `SplitFactoryProvider` with child as a function in v1, to `SplitFactoryProvider` + `SplitClient` with child as a function in v2.
wrapper.rerender(<ComponentupdateOnSdkUpdate={false}updateOnSdkTimedout={false}/>);// should not update the status (SDK_UPDATE event should be ignored)
wrapper.rerender(<ComponentupdateOnSdkUpdate={null/** invalid type should default to `true` */}/>);// trigger re-render and update the status because updateOnSdkUpdate is true and there was an SDK_UPDATE event
269
269
expect(rendersCount).toBe(8);// @TODO optimize `useSplitClient` to avoid double render
0 commit comments