Open
Description
For our team's use case, we often want to get a single split and its treatments. It seems that getTreatment and getTreatmentWithConfig from the underlying javascript-SDK are not currently available as React hooks, but I may have overlooked it in the codebase!
Here's the API I'm thinking of.
const treatment = useTreatment('my_split');
if (treatment === 'on') {
return <OnComponent />
}
return <OffComponent />
Would you be open to me submitting a PR for this? Thank you!
Metadata
Metadata
Assignees
Labels
No labels