Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thoughtspile/svelte-hydration-repro


https://github.com/thoughtspile/svelte-hydration-repro

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

## Reproduction: svelte clears `` on hydration

This repository demonstrates input reset on hydration when using svelte-kit

1. `npm run build`
2. `npm run preview -- --open`
3. Project (single input) opens in the browser
4. Open devtools -> network
5. Check "disable cache" and set throttling to "Slow 3G" fro better reproducibility
6. Reload page
7. Once the HTML has loaded, but before JS in run, type into the input
8. JS arrives

__Expected outcome:__ user input from step 6 is preserved

__Actual outcome:__ input is empty after JS hydrates, causing poor UX on slow network.