https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
s

shy-camera-36585

10/20/2023, 2:31 PM
Hey all, I have a quick question about SSR. I tried to search for it, but no success on my issue. TLDR: we have a React+SSR. I followed the documentation and that seems to be fine, but when we try to resolve the experiment on the server it return the default value (false) and on the client it resolves the experiment as (true). Any suggestion on what I could be missing?
s

swift-helmet-3648

10/20/2023, 4:26 PM
SSR can be tricky because it can be difficult getting user attributes before reaching the client. Usually this is possible via cookies. You need to make sure you're setting user attributes when evaluating features so that GB can bucket the user appropriately
s

shy-camera-36585

10/20/2023, 6:39 PM
We are setting the deviceId on the attributes. The growthbook ready property return true, but for some reason when we try to resolve the experiment it return the default value, not the resolved one
Sorry. I found the issue. It was in one of the configurations I did it wrong. Thx tho!!!
s

swift-helmet-3648

10/20/2023, 7:23 PM
Ok, glad it worked out!
2 Views