https://www.growthbook.io/ logo
#give-feedback
Title
# give-feedback
m

magnificent-refrigerator-88775

08/31/2023, 11:47 AM
Hello, I've successfully integrated Growthbook using the @green-kite-41783/growthbook-react SDK. We're eager to run an A/B test on our pricing plans and have created a feature for pricing variations as follows: const enabled = useFeatureIsOn("new-pricing"); The issue we're facing is that when the "new-pricing" feature is set to false, everything works smoothly. However, when the feature is enabled, we're experiencing lagging for a short period of time (please refer to the attached video). We would greatly appreciate your guidance on how to resolve this issue. Your assistance will be invaluable in ensuring a seamless A/B testing process. Thank you in advance for your support!
w

white-fireman-22476

08/31/2023, 12:46 PM
m

magnificent-refrigerator-88775

08/31/2023, 1:31 PM
Yes I have used a fallback UI
image.png
w

white-fireman-22476

08/31/2023, 1:40 PM
Try calling
const enabled = useFeatureIsOn("new-pricing")
from within the PricingPage itself, instead of passing it in as a prop. As you have it now the enabled variable is loading from outside the FeaturesReady logic.
m

magnificent-refrigerator-88775

08/31/2023, 1:47 PM
I have tried calling useFeatureIsOn in the PricingPage component but the issue persists
w

white-fireman-22476

08/31/2023, 1:50 PM
and you changed the code to use it and got rid of the prop?
You can set
gb.debug=true
on your growthbook object to see console logs of how gb evaluates your feature. That might help you in understanding what is going on.
f

fresh-football-47124

08/31/2023, 4:59 PM
It could be caused by a delay when loading the attributes…
There are some ways around this
one would be to initially not load a price at all, then load in the price based on which variation is loaded - it will flicker, but may just look like loading
it looks like it is assigning a variation, then switching variations (instead of loading the spinner) - which can happen if the attributes change
m

magnificent-refrigerator-88775

09/01/2023, 6:10 AM
Is there any way to load variations on the server and serve the pricing page with variations? It will help improve user experience
f

fresh-football-47124

09/01/2023, 8:12 AM
sure
m

magnificent-refrigerator-88775

09/01/2023, 8:16 AM
ok thanks, @fresh-football-47124 for your support, I am working on rendering variations server-side
thanks @white-fireman-22476 for sorting your support
f

fresh-football-47124

09/01/2023, 8:20 AM
you just have to log that exposure event, doesn’t have to happen client side or server side - but has to happen somewhere
14 Views