Angular · Middle · Question 8 of 75
What does untracked() do inside a computed or effect?
effect(() => {
const user = this.user();
untracked(() => this.logger.log(user, this.settings()));
});- ✓Correct answer: Reads signals without making them dependencies, so changes to
settingsdon't re-run the effect - 2Stops the effect permanently
- 3Runs the callback outside Angular's error handling
Explanation
Every signal read inside a reactive context becomes a dependency. untracked limits re-runs to the signals that should actually trigger the side effect.