Comments (4)
Hi, the subject of explicit effect dependencies was already discussed here: #50916.
from angular.
I know, it's discussed in many places directly or indirectly.
But in #50916, the idea is to modify the current effect function... which I personally don't like as an approach. Let's keep effect as it is.
What I'd ideally like to discuss is the following:
- is it really true that effects can be rarely used?
- what are the official counterarguments for not introducing a watch func?
As I tried to report above, my view is that the usage of effects_untrack is just kind of hidden and highly necessary (and used a lot) for common needs.
It's just that we're still mixing signals / observables... so it's not really clear. But with only signals, I have the feeling the story would be different.
IMO effects would turn (almost) unnecessary with the addition of a watch func.
from angular.
@mauriziocescon this issue essentially re-iterates what was already described in #55027. We hear you but I don't think an additional issue gets us any closer to the solution - what you are describing is well understood.
Let's centralize the discussion in #55027 which represents a real-life use-case.
from angular.
Ok, my bad... just started integrating signals and I find myself using the pattern above in many places! 😂
Gonna create a wrapper for now... 😂
from angular.
Related Issues (20)
- Clarify how to test for errors in effects HOT 2
- `model()` should support a narrower output type HOT 5
- DevTools section not up-to-date
- [NgOptimizedImage] Revert Assertions Against Blob and Data URL's or Document the Rationale
- transparent text on chrome 109 HOT 1
- Links in angular DevTools Overview page is not working
- Feat(adev): faster initial loading + iPad availability of the playground
- compiler: Parser interpolation assertion failure after the introduction of new control flow @ symbol syntax HOT 1
- Angular Update Guide zone.js
- routerLink in child not working - due to defer Block - getting recursion error HOT 16
- Broken images in service worker docs
- Scope of template local variables in Angular @if() block seems wrong HOT 2
- ngsp is not working properly with control flow syntax HOT 1
- @for loop with string identifier throw exception after changing HOT 10
- Improve SEO of angular.dev HOT 1
- Bounds attributes [attr.xxx] do not trigger directives HOT 5
- Reactivity: effects won't execute if created in a component that is detached from a change detection tree HOT 1
- Recursion bug in Angular (child in defer block) HOT 5
- No error showing in HTML for invalid Angular IF statement HOT 3
- Is there a way of renaming input component bindings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.