Skip to content
masterclass Buddy

Angular · Function

effect

Registers a function that runs when signals read by that function change. Angular creates either a component effect or a root effect, with different timing and change-detection behavior.

Last updated

Syntax

effect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions | undefined): EffectRef;

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • EffectCleanupFn
  • EffectCleanupRegisterFn
  • EffectRef
  • CreateEffectOptions
  • signal

Source: effect • Angular. Checked 2026-11-03.