reading_notes

Read: Class 02 - State and Props:

React Component Life-Cycle

React Component Life-Cycle

what happens first, the ‘render’ or the ‘componentDidMount’?

Based on the component life-cycle diagram the the ‘render’ happens first.

What is the very first thing to happen in the lifecycle of React?

The first thing will happen is mounting => When an instance of a component is being created and inserted into the DOM it occurs during the mounting phase.

The order of lifecycle events happening:

  1. constructor
  2. render
  3. componentDidMount
  4. React Updates
  5. componentWillUnmount

componentDidMount:


What types of things can you pass in the props?

What is the big difference between props and state?

When do we re-render our application?

when we change the state inside of our application it’s going to re-render.

What are some examples of things that we could store in state?

Store what they’re updating that value to and what they’re changing that value…