-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Simplify Continuous Hydration Targets #17952
Merged
sebmarkbage
merged 2 commits into
facebook:master
from
sebmarkbage:simplifycontinuoushydration
Feb 3, 2020
Merged
Simplify Continuous Hydration Targets #17952
sebmarkbage
merged 2 commits into
facebook:master
from
sebmarkbage:simplifycontinuoushydration
Feb 3, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let's use a constant priority for this. This helps us avoid restarting a render when switching targets and simplifies the model. The downside is that now we're not down-prioritizing the previous hover target. However, we think that's ok because it'll only do one level too much and then stop.
Having both levels co-exist works. However, if we deprioritize hydration using a single level, we might deprioritize the wrong thing. This adds a test that catches it if we ever try a naive deprioritization in the future. It also tests that we don't down-prioritize if we're changing the hover in the middle of doing continuous priority work.
facebook-github-bot
added
CLA Signed
React Core Team
Opened by a member of the React Core Team
labels
Feb 1, 2020
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d92aea6:
|
Details of bundled changes.Comparing: 38cd758...d92aea6 react-reconciler
react-dom
ReactDOM: size: -0.0%, gzip: 0.0% Size changes (stable) |
Details of bundled changes.Comparing: 38cd758...d92aea6 react-dom
react-reconciler
ReactDOM: size: 0.0%, gzip: -0.0% Size changes (experimental) |
acdlite
approved these changes
Feb 3, 2020
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Let’s use a constant priority for this. This helps us avoid restarting a render when switching targets and simplifies the model.
The downside is that now we're not down-prioritizing the previous hover target. However, we think that's ok because it'll only do one level too much and then stop.
I also add test meant to show why it's tricky to merge both hydration levels. Having both levels co-exist works. However, if we deprioritize hydration using a single level, we might deprioritize the wrong thing.
It also tests that we don't down-prioritize if we're changing the hover in the middle of doing continuous priority work. We don't do the -1 trick for these and so we don't have to consider that in the new model. Just that we shouldn't start doing that.