Hello, I am having problems getting the %rollout t...
# announcements
c
Hello, I am having problems getting the %rollout to work on Growthbook with my React Native mobile app. It seems like all the users are able to see the feature and there are no users for whom the feature is turned off. I have the feature
default value
turned
on
by default and have the % rollout set as an override rule. after setting the attribute i'm using
getFeatureValue()
to read the value though this does not seem to work. Please advise.
s
Hi @clever-gold-88011 In this case I believe you would want your defaultValue to be
off
and the override rule to have a value of
on
c
I have tried that and that doesn't work either, if I turn it
off
then it will have a value of
false
for all the users no matter the override rule telling it to turn on
s
So the issue has to do with the rollout rule ... What is the attribute you are using to assign to users? And can you confirm users are setting their attributes client-side?
c
this is happening for both of the features I have
roullout rules
. for one of them i am using
id
and for the other i am using
deviceId
. yes I'm able to log and see that those attributes exist/have values
we are setting
id
on our side (so in our app) and
deviceId
is being set using
Expo Device
library
here's how i'm reading it:
Copy code
growthbook.getFeatureValue('my-flag', true)
f
is it possible you’re evaluating the feature before the attribute is set?
c
no, i'm setting the attribute on the initial loading screen of our app and evaluating on the screen after that
f
ah
I see the issue
if a user is not included in the rollout rule
they will fallback to the default value
which is also ‘on’
c
i'm including 100% of users, 25% on, 75% off
f
as a rollout or experiment rule?
can you share a screen shot of the rule?
c
Screenshot 2023-07-21 at 3.00.03 PM.png
f
can you test setting the default value to off?
c
I have. in that case the feature is off for 100% of users
f
for the SDK endpoint, can you share (or DM) the json object it’s returning?