Hook to access the active Experiment Center experiment for the current screen.
Experiment object (experimentId, variationId, variationName, variationDescription, config, isControl), or null when no experiment is active or the screen has not opted in via context_configuration
experimentId
variationId
variationName
variationDescription
config
isControl
null
context_configuration
import { useExperiment } from '@auth0/auth0-acul-react/login-id';function ExperimentBranch() { const experiment = useExperiment(); if (!experiment) return null; return experiment.isControl ? <ControlUI /> : <TreatmentUI />;} Copy
import { useExperiment } from '@auth0/auth0-acul-react/login-id';function ExperimentBranch() { const experiment = useExperiment(); if (!experiment) return null; return experiment.isControl ? <ControlUI /> : <TreatmentUI />;}
Hook to access the active Experiment Center experiment for the current screen.