reading-notes

My Reading Journal for Code Fellows!

View on GitHub

Day 2 - React Lifecycle and its ‘state’ vs ‘props’

React: Component Lifecycle Events - Joshua Blankenship

This reading taught the lifecycle of the react component, broke it down into its three phases. Understanding these phases and what events coincide with them will help remember when you can and can’t update the User Interface and the application states.

Based off the diagram, what happens first, the ‘render’ or the ‘componentDidMount’?

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

Put the following things in the order that they happen: componentDidMount, render, constructor, componentWillUnmount, React Updates

What does componentDidMount do?

React State Vs Props Web Dev Simplified

The React State vs Props video taught the differences between state and React. Props can be modified outside the component and then passed down to the state. Mastering these are important to writing dry code for your web application/pages.

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?

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

Things I want to know more about

Are the three phases of the React lifecycle run consecutively or concurrently?