# Component Lifecycle

A component is created, shown, updated and finally destroyed. ngOnInit runs once when it's ready, with its inputs set; ngOnDestroy runs when it's removed, to clean up timers and the like. effect runs code whenever the signals it reads change.

![Cheat sheet: Component Lifecycle](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/f64a9d8737b645248e1a155400a7aaaf.webp)

- Category: Angular
- Level: Apprentice
- Tags: angular, effect(), Lifecycle Hook, ngOnDestroy, ngOnInit
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/component-communication-in-angular-component-lifecycle-cheat-sheet
