Closed notchatbot closed 1 month ago
The problem with async and runes is that dependencies cannot be determined in an async context. Can you describe the feature in more detail? Perhaps with a REPL example?
It worked, but I wanted to achieved that "magical" dx that runes have without a workaround.
Here is the repl
Important: There is a small bug when clicking quickly the button that previous and current values are beign shown at the same time.
I think this is a Svelte bug to be honest. Will check.
Indeed, it's a Svelte bug, will be fixed by https://github.com/sveltejs/svelte/pull/11989
Yeap Await blocks are kind of buggy. Yes! It does work. I guess that the most important part of this behaviour is "in case you are a promise then show the previous value" (Which can be achieve with the $effect that you added, no need for Previous but still might be useful though).
Is this good to close now that the Svelte issue has been resolved? @TGlide @notchatbot
Closed!
Describe the feature in detail (code, mocks, or screenshots encouraged)
I have the following situation
There may be a cool application for Previous that should always be equal to the last awaited value.
What type of pull request would this be?
Enhancement
Provide relevant links or additional information.
No response