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()));
});

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.

Further reading

Problem with a question

Angular · Middle · question 8

Test yourself

Take the Angular · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz