Life Cycle Events

Posted by r0tiart on March 19, 2018

While working on Angular - directives the lessons came across “link” and “compile”. Like React Angular has life cycle events, however there seems to be less interaction with each step within the lifecycle (thus far that is). As this isn’t the first interaction with life cycle events, there seems to be a common theme for front end frame works. To determine what is the “now” and what the elements are or state is at that moment in time.

I recal while working on my React / Redux portfolio project, I was playing around with the different life cycle events to determine which one I need to use - for what I wanted to do. While in react there are more life cycle events to consider (which makes it a little more complex), Angular having only two (thus far) is rather simple to interact with.

Even with learning a different framework, things I’ve learned previously has helped me grasp this quicker. When I was initially learning the Life Cycle Events of React, it was super confusing - determing where in the life cycle you are at, what data they provide you (state/props/current State/prev State). I like how previous knowledge helps promote new knowledge. Learn ON!