angular/packages/core/src/render3/reactivity
Paul Gschwendtner 5d61221ed7 fix(core): disallow using effect inside reactive contexts (#52138)
Using an `effect` inside a `computed` is a clear violation of
the conceptual idea of computed's being pure/ side-effect free.
Additionally, scheduling new effects from an existing actively
running effect is likely unintended as this could degrage application
performance or result in unintentional behaviors. Multiple long-living
effects would be scheduled every time the effect expressions runs.

For these reasons, we are explicitly preventing this pitfal, by
disallowing using `effect` inside reactive contexts.

PR Close #52138
2023-10-10 13:56:56 -07:00
..
api.ts refactor: move signals code into primitives package (#51986) 2023-10-06 15:12:00 -07:00
asserts.ts fix(core): disallow using effect inside reactive contexts (#52138) 2023-10-10 13:56:56 -07:00
computed.ts refactor: move signals code into primitives package (#51986) 2023-10-06 15:12:00 -07:00
effect.ts fix(core): disallow using effect inside reactive contexts (#52138) 2023-10-10 13:56:56 -07:00
signal.ts fix(core): drop mutate function from the signals public API (#51821) (#51986) 2023-10-06 15:12:00 -07:00
untracked.ts refactor: move signals code into primitives package (#51986) 2023-10-06 15:12:00 -07:00