Open Rich-Harris opened 6 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
For anyone stumbling on this you can use a custom component instead of an await
block, something like this REPL
while we wait for updates, but in my opinion this should be the default behavior.
The await
syntax makes writing reactive asynchronous UI really pleasant, but makes components flicker every time a variable they depend on has changed, forcing unwanted DOM changes and re-render cycles.
Much needed in svelte-kit with streaming data 🤞
Related: #8459
Follow-up to #952 / https://github.com/sveltejs/svelte/issues/654#issuecomment-345490875. It would modify the behaviour of
await
blocks such that you'd only see the 'pending' state once — thereafter, whenever a new promise value was set, the old one would be preserved until the promise resolved. An additional argument would be passed to thethen
block, allowing the UI to indicate that the currently displayed data was out of date: