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.
@knecks73748 ай бұрын
@@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.
@WebTechTalk8 ай бұрын
@@knecks7374 Even Angular is also moving towards functional
@karthikrachamadugu5275 Жыл бұрын
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?
@WebTechTalk Жыл бұрын
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.
@karthikrachamadugu5275 Жыл бұрын
@@WebTechTalk great explanation sir
@karthikrachamadugu5275 Жыл бұрын
@@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
@WebTechTalk Жыл бұрын
@@karthikrachamadugu5275 Don't confuse Angular with React bro. Both are totally different.