https://www.growthbook.io/ logo
w

white-salesclerk-40048

09/07/2023, 3:50 PM
Hello, if I'm initializing growthbook once using the javascript SDK and once using the react sdk, both times using the same user ID, can the feature flag I'm extracting be different in both instances or should they be the same if it's the same ID?
s

swift-helmet-3648

09/07/2023, 5:44 PM
Based on user attributes passed to your GrowthBook SDK, if the attributes are the same, the FF values should evaluate to the same
w

white-salesclerk-40048

09/10/2023, 11:27 AM
I tried hardcoding the user attributes in both initializations the react and js ones, I got different FF values
s

swift-helmet-3648

09/11/2023, 4:01 PM
That's strange. To be clear, you're using
setAttribute
method to accomplish this in either context? And what are the targeting rules of the experiment?
w

white-salesclerk-40048

09/11/2023, 4:03 PM
Yes this was using setAttribute, the targeting rules were the country code and I also hardcoded it, I found a way to avoid this from happening, I used the javascript SDK also in the client side instead of the react one and the feature flag was consistent in both sides after I implemented this change