dillon1000/react

Commit

Simplify Continuous Hydration Targets (#17952)

* Simplify Continuous Hydration Targets

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.

* 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.

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.
Browse files
Changed paths3 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactDOMServerSelectiveHydration-test.internal.js ModifiedM packages/react-reconciler/src/ReactFiberExpirationTime.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…