You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flashing page elements on wasm file load on prerendered pages.
How to reproduce
Try to open kavik.cz/about/ on a mobile or in a desktop browser with enabled throttling in dev tools. The first you see prerendered html and once the wasm is loaded, the entire page is rerendered which causes flashes.
Motivation
Flashing page elements on wasm file load on prerendered pages.
How to reproduce
Try to open kavik.cz/about/ on a mobile or in a desktop browser with enabled throttling in dev tools. The first you see prerendered html and once the wasm is loaded, the entire page is rerendered which causes flashes.
Problem
This code: https://github.com/MartinKavik/kavik.cz/blob/master/crate/src/app.rs#L49. I have to delete root element content before render, otherwise Seed will append identical html at the end of the root.
How to resolve
Use prerendered HTML as the previously rendered HTML by Seed. So either introduce a new function
hydrate
or makerender
more intelligent (probably better option). There are examples from other frameworks: https://github.com/stereobooster/react-snap#basic-usage-with-create-react-app.Possible implementation problems
Prerendered and rendered code isn't 100% identical, e.g. hamburger is spinner in prerendered version (see my example in section
how to reproduce
).Public API changes.
None, if we update
render
function.The text was updated successfully, but these errors were encountered: