Photo by Michael & Diane Weidner on Unsplash
React and Component Lifecycles. Today I Learned: Monday, June 27 2022
- Continuing with Codecademy’s React course.
- Now it’s talking about the component lifestyle of React.
- It consists of three ‘high-level’ parts.
- Mounting.
- When a component is put into the DOM for the first time.
- Updating
- Unmounting
- When a component is removed from the DOM.
- Mounting.
- It consists of three ‘high-level’ parts.
- Lifecycle methods are methods relating to the lifecycle. constructor() and render() are examples.
- Single Responsibility Principal. Not sure exactly what this is. Something got to do with constructor() methods.
- During the mounting phase, you call three lifecycle methods in this order.
- The constructor
- render()
- componentDidMount()
- This stuff is pretty difficult. I’m going through the tutorial, but the concepts are tough to understand.
- SPA stands for Single Page Application. youtube.com/watch?v=zbHb1c_gII4&list=WL..