prehistoric-waitress-6977
05/06/2022, 1:15 PMmillions-father-50159
05/06/2022, 8:11 PM@growthbook/growthbook-react
.
We’re using nx
as our mono-repo tool, which could likely be a factor.
We have a specific feature-flags
package that houses our FeatureFlagContextProvider
component which renders the GrowthbookProvider
. This gets imported and rendered at the root of our web-app
(separate “package”). If I write some code to useFeature
in either of these packages we have no problems.
We then have a separate queries
package that houses all of our react-query
queries for loading application data. I was attempting to use a feature in one of the queries, however, in debugging it was clear that this line in useFeature
const { growthbook } = useContext(GrowthbookContext)
was the culprit in that growthbook
was undefined
. It’s interesting because if I call the function that wraps this logic side by side with useFeature
in web-app
, the useFeature
in web-app
correctly gets the feature value whereas the one in queries
is unable to because growthbook
is undefined
.
Anyone encounter a similar issue ever?swift-beach-91166
05/07/2022, 9:12 AMlimited-eve-60615
05/07/2022, 1:03 PMdefault value
is shared between environments, instead of being distinct to each.
Say I have feature X
working in test
under a boolean on/off
flag, so I just want to enable it in test
and have the default value as on
.
For prod
I want to X
to be off
for everyone except for some internal users, but if I enable it in prod
and set the default value as off
it then affects the test
env.
My current hack is to enable the feature in all envs with default value as on
, then in prod
adding an override clause that turns on the feature if the userId matches some condition.
If there are distinct default values for each env then they are isolated and you won't risk accidentally breaking one when configuring the other. Plus I can see that override rules
are already env-scoped. So I was just wondering if there are specific reasoning behind making default value
a global config.
I'm very new to feature toggling in general any suggestion/criticism is more than welcome!prehistoric-waitress-6977
05/08/2022, 1:18 PMprehistoric-waitress-6977
05/08/2022, 1:40 PMprehistoric-waitress-6977
05/08/2022, 6:30 PMfancy-zoo-90893
05/09/2022, 9:35 AMrapid-ghost-5775
05/09/2022, 12:09 PMprehistoric-waitress-6977
05/10/2022, 1:15 PMprehistoric-waitress-6977
05/10/2022, 1:17 PMfamous-potato-10766
05/10/2022, 5:52 PMprehistoric-waitress-6977
05/10/2022, 10:25 PMhallowed-midnight-4935
05/11/2022, 6:01 AMlimited-eve-60615
05/11/2022, 9:57 AMgrowthbook
will probably want to adopt in the long run (project-specific, SSO, proxy cache etc.), so I guess it wouldn't be unfair for one to think why not go with the project that offers more.brash-raincoat-88597
05/12/2022, 2:52 AMlively-fountain-60753
05/12/2022, 8:56 AMuser_id
. Would it be possible to enable Dimensions & Segments also for anonymous_id
?
Thank you very much!brief-xylophone-99360
05/12/2022, 10:40 AMhelpful-carpenter-3208
05/14/2022, 2:55 PMgorgeous-angle-33742
05/16/2022, 6:29 AMb, _ := json.Marshal(jsonMap["features"])
features := growthbook.ParseFeatureMap(b)
contextGB := growthbook.NewContext().
WithFeatures(features).
WithAttributes(growthbook.Attributes{
"Key": ID,
})
gb := growthbook.New(contextGB)
if gb.Feature("backend_enable_digilocker").On {
log.Println("FEATURE IS ON")
}
helpful-carpenter-3208
05/16/2022, 7:31 AMfancy-zoo-90893
05/16/2022, 2:37 PMbrief-xylophone-99360
05/16/2022, 4:43 PMhelpful-carpenter-3208
05/17/2022, 4:05 AMambitious-parrot-39602
05/17/2022, 4:32 AMambitious-parrot-39602
05/17/2022, 4:36 AMhelpful-carpenter-3208
05/18/2022, 2:24 AMProjects
page. then the list back to normal. sounds like a cache problem.lemon-stone-42630
05/18/2022, 10:50 AMfeatures
field in this case: https://docs.growthbook.io/app/api#feature-definitions-endpoint
So, just to be sure that it is reasonable to expect that even if the status
is something else than 200
there would be empty {}
for features?hundreds-mouse-83155
05/18/2022, 2:01 PMfresh-football-47124