Skip to content

Latest commit

 

History

History
33 lines (16 loc) · 1013 Bytes

File metadata and controls

33 lines (16 loc) · 1013 Bytes

React

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

static getDerivedStateFromProps() The static getDerivedStateFromProps is the first React lifecycle method to be invoked during the updating phase

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

constructor

componentWillUnmount

render

componentDidMount

React Updates

What types of things can you pass in the props? strings

What is the big difference between props and state?

"props" (short for "properties") is an object of arbitrary inputs a React function component accepts as the first argument. "state" is data that changes over the lifetime of a specific instance of a React component. When do we re-render our application? when data change

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

Counter and Forms