Repository navigation
docs: the home page's hero shows hydration: all at once when sent whole, a part at a time when streamed - #108
Merged
Conversation
…le, a part at a time when streamed The hero drew when each part's HTML arrived, and stopped there. A part now lands as server HTML and is hydrated half a second later, with a ring that fades at that moment. Sent whole, the page hydrates in one go at 3.5 s. Streamed, the product hydrates at 0.6 s, the reviews at 1.5 s and the recommendations at 3.5 s. The parts are in the race figure's order, with the slowest in the middle, so the streamed page fills and hydrates out of order. Each part says its state in words, and the colour repeats it with the figures' colours: placeholder, server HTML, hydrated. Every part of both pages ends on the same one. The clock runs to 4 s and the loop is 8 s. Under prefers-reduced-motion it stands still at 1.25 s, where the streamed page shows all three states.
This file contains hidden or 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
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.
The hero drew when each part's HTML arrived, and stopped there. It now shows hydration too.
What changes
racefigure's order (Product, Recommendations, Reviews), so the streamed page fills and hydrates out of order: the first part, then the third, then the middle one.figures/mock.css): placeholder, server HTML, hydrated. Every part of both pages ends on the same one.prefers-reduced-motionit stands still at 1.25 s, where the streamed page shows all three states.Both pages still finish at the same moment, so the text under the hero stays true.
Checked
On the built site, in headless Chrome:
vp checkpasses."Recommendations" is still clipped in its box at 320px, as it was before.