Use attributes to target an specific audience.
import { useExperiment } from 'react-tesfy';const Hook = () => {const id = 'experiment-2';const variationId1 = useExperiment({ id, attributes: { countryCode: 've' } }); // nullconst variationId2 = useExperiment({ id, attributes: { countryCode: 'us' } }); // '0'};
import { Experiment, Variation } from 'react-tesfy';const Simple = () => (<><Experiment id="experiment-2" attributes={{ countryCode: 've' }}><Variation>Rendered</Variation><Variation id="0">Not rendered</Variation></Experiment><Experiment id="experiment-2" attributes={{ countryCode: 'us' }}><Variation>Not endered</Variation><Variation id="0">Rendered</Variation></Experiment></>);