Skip to content
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

Suggestion: add extendedEffect that gets the previous return value passed, similar to extendedComputed #438

Open
ptandler opened this issue Jul 3, 2024 · 0 comments

Comments

@ptandler
Copy link

ptandler commented Jul 3, 2024

In Vue.js, the watch function gets the new and old watched value passed as arguments, which is really helpful in case the differences matter, or when I want to release the previous allocated resource and need the previous resource handle.

The effect in Angular works a little different and does not provide help here, so what about adding a extendedEffect that works similar to extendedComputed (or to Vue's watch) which is evaluated eagerly and gets the previous value as argument?

See also https://stackoverflow.com/questions/76200595/possible-to-access-the-old-value-in-angular-16s-effect-function-similar-to-vuejs-watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant