Relative Content

Tag Archive for angulartypescriptangular-signals

Angular Signal multiple updates within single method triggers effect (or computed) once

While moving into the world of signals our team have encountered seemingly odd issue. Let’s imagine a component with effect on signal which is a public member there. In component constructor some logic is performed which updates signal value multiple times. The expectation was, this will be reflected by firing effect same amount of times that signal value updates were performed, but it actually does not happen in such way. Instead effect is fired first time after whole component initialization is over.