-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Display source environment in LaunchDevly UI #418
feat: Display source environment in LaunchDevly UI #418
Conversation
@@ -23,61 +29,70 @@ function Flags({ selectedProject, flags, setFlags }: FlagProps) { | |||
Record<string, FlagVariation[]> | |||
>({}); | |||
|
|||
const overridesPresent = overrides && Object.keys(overrides).length > 0; | |||
const overridesPresent = useMemo( |
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.
best practice to not recalculate these every time
...{ | ||
[flagKey]: { | ||
value: overrideValue, | ||
const updateOverride = useCallback( |
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.
useCallback lets us cache this func definition between renders
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.
Do we want that though? We closure in the override state...
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.
ohhh, I see you also pass in the deps.
1e92281
into
mikezorn/sc-254693/validate-overrides-against-what-s-in-the
Requirements