brief-honey-45610
09/21/2023, 4:04 AMbrief-honey-45610
09/21/2023, 4:04 AMbillowy-lizard-55653
10/24/2023, 3:45 PMexport default function App() {
...
<body>
<GrowthBookProvider growthbook={gb}>
<Layout {...data}>
<Outlet />
</Layout>
</GrowthBookProvider>
...
}
and then this:
export default function Homepage() {
...
const gbFeature = useFeatureIsOn("test-feature");
console.log(gbFeature)
...
}
In another GB implementation it has not been an issue to see different feature values in different browser sessions (incognito windows for example). I am assigning with Google Analytics clientId and I can see this is set (by using the useGrowthBook() method to access GB instance directly), and that it is being set differently in different browser sessions. It is being set via a promise:
useEffect(() => {
// Set user attributes for targeting (from cookie, auth system, etc.)
gb.setAttributes({
clientId: getClientId(),
});
}, []);
which may mean the value is not available for assigning variation (getClientId awaits a promise). This may or may not be related though. I have got the same underlying approach working in Vue no problem, but may be missing something about React here. Thanks for any advice.astonishing-window-33175
10/27/2023, 1:15 PM{
"status": 200,
"features": {
"title-text": {
"defaultValue": "GROWTH BOOK LIVES!"
}
},
"dateUpdated": "2023-10-27T12:24:24.615Z"
}
astonishing-window-33175
10/30/2023, 10:27 PMtrackingCallback
‘_required_’ for A/B testing? I’m struggling to see what I would be analysing.