early-library-47961
04/14/2023, 6:34 AMprehistoric-oxygen-56976
04/14/2023, 1:59 PM@growthbook/growthbook-react
-package to setup growthbook for our React app. With the introduction of the typesafe sdk we were looking at adding the typing to catch the typos etc.
Creating the types (AppFeatures
) with the instructions works well, but when I try to use them when creating the Growthbook-object with the type defined, typescript is complaining with the error Expected 0 type arguments, but got 1.
Our code looks like this
import { GrowthBook } from '@growthbook/growthbook-react';
export const growthbook = new GrowthBook<AppFeatures>({
apiHost: '<https://cdn.growthbook.io>',
clientKey: ...,
decryptionKey: ...,
enableDevMode: ...,
onFeatureUsage: (featureKey, result) => {
...
},
trackingCallback: (experiment, result) => {
...
},
});
The exported growthbook object is used as growthbook.loadFeatures()
when the app renders the first time.
Q: do I need to change to use the @growthbook/growthbook
-package instead or create a custom hook by using the useGrowthbook
-hook as base?gorgeous-guitar-5716
04/14/2023, 3:36 PMflaky-minister-92318
04/18/2023, 7:53 AMimportant-scooter-19137
04/18/2023, 10:54 AMworried-yacht-64692
04/18/2023, 2:12 PMprocess not defined
I was just wondering if anyone had any ideas on what I am missing here?worried-yacht-64692
04/18/2023, 2:37 PMdry-bird-34118
04/18/2023, 2:44 PMworried-yacht-64692
04/18/2023, 3:51 PMgreen-engine-21191
04/19/2023, 7:48 AMloud-addition-36597
04/19/2023, 1:32 PMadventurous-shampoo-45834
04/20/2023, 12:20 AMlate-whale-55081
04/20/2023, 10:47 AMsticky-insurance-60813
04/20/2023, 7:58 PMflaky-minister-92318
04/21/2023, 2:09 AMacceptable-carpenter-55285
04/23/2023, 12:16 AMboundless-football-50785
04/24/2023, 8:11 AMmammoth-church-11916
04/25/2023, 11:25 AMmany-wall-58468
04/26/2023, 2:22 PMevents_
tables in the experiment queries to events_intraday_
, but not sure if that’s possible.brash-fireman-45530
04/26/2023, 4:04 PMconst gb = useGrowthBook();
if (gb.ready) {
// Do something
}
When does the gb.ready
flag switch?nutritious-airport-83990
04/26/2023, 4:23 PMgifted-queen-1541
04/26/2023, 11:38 PMIf UID is in the list ["aaa", "bbb", "ccc"], then value should be "On"
The feature flag works as expected if I use a single value and “is equal to” condition. If I use the “is in the list” condition, it always evaluates to false.
Any thoughts on why?freezing-apple-73992
04/28/2023, 4:44 AMbusy-air-96466
05/02/2023, 4:14 PMdamp-branch-45047
05/03/2023, 10:06 AMdamp-branch-45047
05/03/2023, 10:12 AMbusy-air-96466
05/03/2023, 2:26 PMhallowed-lifeguard-32533
05/04/2023, 4:01 PMbreezy-king-73167
05/05/2023, 5:22 AMproud-painting-61484
05/08/2023, 10:14 PM