Skip to content

Fix useSplitClient hook to properly respect updateOn<Event> options when the function is re-called#232

Merged
EmilianoSanchez merged 6 commits into
developmentfrom
fix_useSplitClient
Apr 8, 2025
Merged

Fix useSplitClient hook to properly respect updateOn<Event> options when the function is re-called#232
EmilianoSanchez merged 6 commits into
developmentfrom
fix_useSplitClient

Conversation

@EmilianoSanchez

@EmilianoSanchez EmilianoSanchez commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

React SDK

What did you accomplish?

Fix a wrong behaviour with useSplitClient hook, that was not properly memoizing the internal client status according to the provided updateOn<Event> options, resulting in unexpected re-evaluations when the SDK was updated and the hook function re-called due to a re-render in the component.

How do we test the changes introduced in this PR?

Added tests to avoid regressions.

Extra Notes

@EmilianoSanchez
EmilianoSanchez requested a review from a team as a code owner April 8, 2025 13:30
Base automatically changed from misc to development April 8, 2025 14:44
@EmilianoSanchez
EmilianoSanchez merged commit 83abcc5 into development Apr 8, 2025
@EmilianoSanchez
EmilianoSanchez deleted the fix_useSplitClient branch April 8, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants