N
N
NarkoMan012021-06-25 12:23:56
Angular
NarkoMan01, 2021-06-25 12:23:56

Analogue of React useEffect in Angular?

Is there an analogue of useEffect in Angular?
For example:

useEffect(()=>{
      //some code
   },[exampleState])

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Brezhnev, 2021-06-25
@vanchelo

Angular also has component life cycle hooks
analogous to useEffect - ngAfterViewInit and ngOnChanges
https://metanit.com/web/angular2/2.8.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question