Skip to content

Commit 8eea928

Browse files
Update changelog entry
1 parent e481b0e commit 8eea928

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGES.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
2.1.1 (April 8, 2025)
1+
2.1.2 (April XX, 2025)
2+
- 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.
3+
4+
2.1.1 (April 9, 2025)
25
- Bugfixing - Fixed `useSplitClient` and `useSplitTreatments` hooks to properly respect `updateOn<Event>` options. Previously, if the hooks were re-called due to a component re-render, they used the latest version of the SDK client status ignoring when `updateOn<Event>` options were set to `false` and resulting in unexpected changes in treatment values.
36

47
2.1.0 (March 28, 2025)

src/__tests__/useSplitClient.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ describe('useSplitClient', () => {
251251
expect(currentStatus).toEqual(previousStatus);
252252

253253
wrapper.rerender(<Component updateOnSdkUpdate={false} updateOnSdkTimedout={true} />); // trigger re-render because there was an SDK_READY_TIMED_OUT event
254-
expect(rendersCount).toBe(4);
254+
expect(rendersCount).toBe(4); // @TODO optimize `useSplitClient` to avoid double render
255255
expect(currentStatus).toMatchObject({ isReady: false, isReadyFromCache: false, hasTimedout: true });
256256

257257
act(() => mainClient.__emitter__.emit(Event.SDK_READY)); // trigger re-render
@@ -266,7 +266,7 @@ describe('useSplitClient', () => {
266266
expect(currentStatus).toEqual(previousStatus);
267267

268268
wrapper.rerender(<Component updateOnSdkUpdate={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-
expect(rendersCount).toBe(8);
269+
expect(rendersCount).toBe(8); // @TODO optimize `useSplitClient` to avoid double render
270270
expect(currentStatus.lastUpdate).toBeGreaterThan(previousStatus.lastUpdate);
271271

272272
act(() => mainClient.__emitter__.emit(Event.SDK_UPDATE)); // trigger re-render because updateOnSdkUpdate is true

0 commit comments

Comments
 (0)