-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DTRA]feat: added growthbook feature flag for dtrader-v2 #17160
base: master
Are you sure you want to change the base?
[DTRA]feat: added growthbook feature flag for dtrader-v2 #17160
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
🚨 Lighthouse report for the changes in this PR:
Lighthouse ran with https://deriv-app-git-fork-vinu-deriv-vinu-dtra-1932growthbook-f-ec3c5c.binary.sx/ |
Pull Request Test Coverage Report for Build 11287418770Details
💛 - Coveralls |
|
||
const App = ({ passthrough }: Apptypes) => { | ||
const [dtrader_v2_enabled] = useGrowthbookGetFeatureValue({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will new value from useGrowthbookGetFeatureValue
hook triggers App component re-rendering? In case of 'yes' do we need then part with setting state in useEffect?
I mean could you please check, will it work without
const [dtrader_v2_enabled_gb, setDTraderV2EnabledGb] = React.useState(false);
React.useEffect(() => {
setDTraderV2EnabledGb(Boolean(dtrader_v2_enabled));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [dtrader_v2_enabled, Analytics?.getInstances?.().ab?.GrowthBook.getFeatures()]);
Changes:
Please provide a summary of the change.
Screenshots:
Please provide some screenshots of the change.