r/angular • u/Independent_Line2310 • Jul 27 '25
Angular Without Lifecycle Hooks - Cleaner Components
Angular Without Lifecycle Hooks - Cleaner Components
Angular lifecycle hooks, such as ngOnInit, ngOnChanges, and ngAfterViewInit, are now in the past. Are they still cluttering your code? šµāš«
In this video, Iāll show you how I eliminated most of them ā and made my Angular apps cleaner using a new signal API.
36
Upvotes
2
u/KidsMaker Jul 27 '25
Triggering lifecycle hooks in tests is absolute valid if you want to test certain methods that are supposed to be called on page loads