-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Previous awaited value #82
Comments
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? |
Can't you just do something like this? |
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. |
Anyways, is something like this what you wanted? REPL |
Indeed, it's a Svelte bug, will be fixed by sveltejs/svelte#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
The text was updated successfully, but these errors were encountered: