jolly-pharmacist-88915
12/26/2024, 2:58 AMconst gb = useGrowthBook();
// Set Attribute
const { user, isAuthenticating } = useAuthStateProvider();
const deviceId = getDeviceId();
const { isMobile } = useScreen();
useEffect(() => {
(async () => {
if (isAuthenticating) return;
gb.updateAttributes({
userId: user?.id ?? "-1",
deviceId,
isMobile,
});
try {
const ip = await getIp();
gb.updateAttributes({ ip });
} catch {}
})();
}, [user, deviceId, isMobile, gb, isAuthenticating]);
I use React SDK in my Next.js project. When I update the attributes, I checked experiments through GrowthBook devtool and found out the experiment variation didn't update.fresh-football-47124
fresh-football-47124
fresh-football-47124
jolly-pharmacist-88915
12/26/2024, 5:24 AMimport { useGrowthBook } from "@growthbook/growthbook-react";
const gb = useGrowthBook();
gb.updateAttributes({
userId: user?.id ?? "-1",
deviceId,
isMobile,
});
How can I check if it's something wrong with the devtool?
Will trackingCallback
be called if there is any experiment is updated?jolly-pharmacist-88915
12/26/2024, 6:50 AMtrackingCallback
meaning. Actually, the experiment's variation was updated, but I thought as soon as the variation is updated, trackingCallback
will be called again.