Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Angular NG0600 means a signal was changed with set() or update() while Angular was evaluating a computed, linkedSignal, or template. Find the write in the stack trace, then move it to the right pattern: use computed for derived values, linkedSignal for derived values that must remain writable, and an event or effect for genuine state changes or side effects.

What causes Angular NG0600?

Angular raises NG0600 when code writes to a signal during a reactive read or render. Its NG0600 error reference specifically identifies writes made while a computed or a template is being evaluated. A write during a linkedSignal computation is also disallowed: those computations derive a value rather than serve as a place to mutate other signals.

The restriction prevents a read or render from changing state as a side effect of working out what a value should be. Angular’s error message indicates whether the write happened during a computed evaluation or template rendering. The stack trace points to the set() or update() call; trace upward to find the computation or template expression that invoked it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix a write inside a computed

If a value is determined entirely by other signals, represent it as a computed instead of storing a duplicate signal and updating it from inside another computation.

Problem: writing a duplicate derived value

count = signal(1);
total = signal(0);

doubled = computed(() => {
  this.total.set(this.count() * 2); // NG0600: write during computation
  return this.count() * 2;
});

Fix: derive the value directly

count = signal(1);
doubled = computed(() => this.count() * 2);

Now doubled() reflects the current count() without a second signal that must be kept in sync. Angular’s Signals guide recommends computed signals for this kind of derived state.

Choose the right place for the state change

The appropriate replacement depends on why the value changes. Use this distinction rather than moving every disallowed write into an effect.

What you need Use Why
A value determined only by other signals computed Derives the value without duplicating it as separately updated state.
A derived value that must also be set by a user or application logic linkedSignal Provides a writable value that can track a source.
Synchronization with storage, a custom DOM operation, logging, or an imperative third-party API effect Runs a side effect in response to signal changes.
A state transition caused by a user action Event handler or suitable output/lifecycle handler Keeps the write at the point where the action or transition occurs.

Angular’s linkedSignal guide covers writable derived state. Reserve effect for external or imperative side effects, as described in the effect guide; routine propagation from one signal to another is usually better expressed directly with computed or linkedSignal.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix a write triggered by template rendering

Template expressions run as part of rendering. If a template calls a method and that method changes a signal, the write still happens during the render; hiding it inside a method does not make it safe.

views = signal(0);

label() {
  this.views.update(value => value + 1);
  return 'Views: ' + this.views();
}

If the template calls label(), rendering it causes the write. Move the update to the user event that should change the count, or to another appropriate application lifecycle or output handler. Keep the template expression focused on reading and displaying state.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Can you write to a signal inside an effect?

In current Angular documentation, signal writes are allowed by default in effects, and the allowSignalWrites option is deprecated because it is no longer required. See the current CreateEffectOptions API reference.

This guidance differs from Angular v18’s Signals guide, which described writes as blocked by default and showed opting in with allowSignalWrites. If you are maintaining a v18 application, read guidance for that version rather than applying the current API wording to it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Permission to write inside an effect does not make an effect the best fix for every NG0600. Using an effect to copy one signal into another can produce circular updates, expression-changed errors, or unnecessary change-detection cycles. If the second value is simply derived, replace the write with computed; if it is derived but must remain writable, consider linkedSignal.

A practical debugging sequence

  1. Read the NG0600 message to determine whether Angular reports a computed evaluation or template render.
  2. Find the signal’s set() or update() in the stack trace.
  3. Trace callers upward to the computed, linkedSignal, or template expression that caused the write.
  4. Decide whether the value is derived, writable derived state, an external side effect, or a response to an action.
  5. Replace the write with the matching pattern: computed, linkedSignal, an appropriate effect, or an event/lifecycle/output handler.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.