Skip to content

Add useSplitManager hook#167

Merged
EmilianoSanchez merged 11 commits intohooks_baselinefrom
hooks_useSplitManager
Nov 15, 2023
Merged

Add useSplitManager hook#167
EmilianoSanchez merged 11 commits intohooks_baselinefrom
hooks_useSplitManager

Conversation

@EmilianoSanchez
Copy link
Copy Markdown
Contributor

@EmilianoSanchez EmilianoSanchez commented Nov 2, 2023

React SDK

What did you accomplish?

  • Add useSplitManager hook to replace useManager. Similar to useSplitClient and useSplitTreatments for useClient and useTreatments respectively, it returns an object with the Split context together with the manager instance.
const { manager, isReady, ... } = useSplitManager() // new hook

const manager = useManager() // deprecated

How do we test the changes introduced in this PR?

  • Unit tests

Extra Notes

@EmilianoSanchez EmilianoSanchez requested a review from a team as a code owner November 2, 2023 18:15
Base automatically changed from hooks_export to hooks_baseline November 14, 2023 14:24
@EmilianoSanchez EmilianoSanchez merged commit 1424ab3 into hooks_baseline Nov 15, 2023
@EmilianoSanchez EmilianoSanchez deleted the hooks_useSplitManager branch November 15, 2023 17:38
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