Nowadays react developers are using functional hooks. In older applications only these component lifecycle methods were used. Also I am out of React for more than a year and so I am not sure whether component lifecycle methods are still in use. I didn't explore the recent versions of react.
@@WebTechTalk oh ok , thanks for replying. Nowadays usage of hooks is preferred over everything else. These component lifecycle methods can come in use in some really specific instances.
ComponentDidMount(run only once before DOM print to screen)==ngOninit ComponentWillUnmount==ngOndestroy ComponentDidUpdate(runs for every update)==? ShouldComonentUpdate(true-compinent update,false-component won't update)==? Is my understanding correct sir . What is angular equivalent of didUpdate and ShouldComonentUpdate?
You can't directly compare the lifecycle methods bro. But as you have already related, you can think of DidUpdate as change detection in angular. So, you can relate to DoCheck. But not completely. DoCheck runs for every change detection. But DidUpdate runs only when there is a change in props or state. Should component update is a react specific lifecycle to decide whether to run DidUpdate or not.
@@WebTechTalk 1)then what about ngAgterView Init,initChecked,contentInit,content Checked-how do we implement those in React 2) Directives,pipes all are not available how they implement it in React
Keep going
Thank you
Do these methods still find use in modern react?
Nowadays react developers are using functional hooks. In older applications only these component lifecycle methods were used. Also I am out of React for more than a year and so I am not sure whether component lifecycle methods are still in use. I didn't explore the recent versions of react.
@@WebTechTalk oh ok , thanks for replying. Nowadays usage of hooks is preferred over everything else. These component lifecycle methods can come in use in some really specific instances.
@@knecks7374 Even Angular is also moving towards functional
ComponentDidMount(run only once before DOM print to screen)==ngOninit
ComponentWillUnmount==ngOndestroy
ComponentDidUpdate(runs for every update)==?
ShouldComonentUpdate(true-compinent update,false-component won't update)==?
Is my understanding correct sir .
What is angular equivalent of didUpdate and ShouldComonentUpdate?
You can't directly compare the lifecycle methods bro. But as you have already related, you can think of DidUpdate as change detection in angular. So, you can relate to DoCheck. But not completely. DoCheck runs for every change detection. But DidUpdate runs only when there is a change in props or state. Should component update is a react specific lifecycle to decide whether to run DidUpdate or not.
@@WebTechTalk great explanation sir
@@WebTechTalk 1)then what about ngAgterView Init,initChecked,contentInit,content Checked-how do we implement those in React
2) Directives,pipes all are not available how they implement it in React
@@karthikrachamadugu5275 Don't confuse Angular with React bro. Both are totally different.
@@karthikrachamadugu5275 Thank you