Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
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
GH-1975 Theme Framework & GH-1972 Palm Theme #517
GH-1975 Theme Framework & GH-1972 Palm Theme #517
Changes from 1 commit
317ab64f050b83e8d7f92f9b1546a9a12aafc6149405a37b30e0beef8a66ff91ff8eb460cfc9105f8718824b2a3d36fd1a260c62786606431b2cb005183da745f95623e3b4fa536dd74d9e06f5File filter
Jump to
wlycdgrMar 27, 2020
Member
This is a good use case for contexts, which allow you to make this kind of 'global' setting available to every component in the tree without manually passing the value down component by component. In fact, themes are the example used in the context React docs! - https://reactjs.org/docs/context.html
benstrumeyerApr 6, 2020
Author
Contributor
Used context for the first time! It's soo clean
wlycdgrMar 27, 2020
Member
Nice
fcjrMar 28, 2020
•
edited
Member
Ignore my last comment, the early returns makes this work😬 I'm dumb, but regardless, can you swap the order of these statements, switches read a bit clearer when the default case is the last one
benstrumeyerMar 31, 2020
Author
Contributor
Oh wow, I didn't know it worked like that. I'll always put default on the bottom then. Either way, good find
wlycdgrMar 27, 2020
Member
👍
wlycdgrMar 27, 2020
Member
Let's do same for
this.statewhile we're at it.benstrumeyerMar 31, 2020
Author
Contributor
Destructured this.state as well
wlycdgrMar 27, 2020
Member
Is this meant to be an "on top of everything else for sure" value? If so, use max int
benstrumeyerMar 31, 2020
Author
Contributor
Used max int!