Skip to content
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

web: fix re-rendering on a few providers #5478

Merged
merged 1 commit into from
Feb 15, 2022
Merged

web: fix re-rendering on a few providers #5478

merged 1 commit into from
Feb 15, 2022

Conversation

nicks
Copy link
Member

@nicks nicks commented Feb 10, 2022

Hello @lizzthabet,

Please review the following commits I made in branch nicks/features:

288fba1 (2022-02-10 16:28:38 -0500)
web: fix re-rendering on a few providers

Code review reminders, by giving a LGTM you attest that:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics

@nicks nicks requested a review from lizzthabet February 10, 2022 21:29
Copy link
Contributor

@lizzthabet lizzthabet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a request for comments!

export const FeaturesProvider = FeaturesContext.Provider
// Server-side flags are formatted as a list.
// Many tests uses the {key: value} format.
export function FeaturesProvider(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only used on the hud top-level component, right? it might be helpful to have a comment here and in the SnapshotProvider that explains when you'd use the Provider vs. theValueProvider.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya, i'm open to better naming on this. maybe TestProvider?

the difference is that the "real" provider wants to read other hooks for their input, but in a test provider, you just want to provide the input directly.

@nicks nicks merged commit 8a8cf3f into master Feb 15, 2022
@nicks nicks deleted the nicks/features branch February 15, 2022 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants