mirror of
https://github.com/angular/angular.git
synced 2026-11-29 18:07:51 -05:00
* Prevent reads of signals during the notification process. This shouldn't ever be triggered by user code but is more of a preventative for internal misuse. Reading a signal during notification would/could create glitches where the values being read are not updated to reflect the values being updated by the notification. * Prevent signal writes inside of computed's. These are meant to be derived values and should not have any side-effects like writing new values to other signals * Prevent signal writes inside of effects by default. Writing to signal values during the execution of an effect can lead to the `ExpressionChangedAfterItHasBeenCheckedError` if writing to signals that represent global state which is read in a parent component. This is mostly just a problem for `OnPush`/`CheckAlways` components, but with signals being new and pure signal components not even available yet, it will be the majority for a long time. PR Close #49631