-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: $effect.pending(value)
(runtime-first approach)
#16926
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
base: effect-pending-value
Are you sure you want to change the base?
feat: $effect.pending(value)
(runtime-first approach)
#16926
Conversation
|
|
If we can get this to work, that'd would be way better. Right now I'm seeing some glitchy behaviour — I suspect it's less caused by this PR than revealed by it, but either way we need to investigate. With the other PR it's possible to get into a broken state if you spam the button enough... Screen.Recording.2025-10-13.at.2.48.02.PM.mov...but with this PR it seems to happen much more easily: Screen.Recording.2025-10-13.at.2.49.45.PM.mov |
Basically as soon as you have an |
I'm somewhat confident this is the same bug that caused me to add the |
This lifts the restriction of having to put this lexically inside an effect, now it can appear anywhere as long as it's called in the context of an effect or derived. We're leveraging the existing pending logic but instead of returning a number we're executing the function that was passed and return its result. We also have a map with all the current source values which is used for the duration of the execution of said function.