reading-notes
My reading notes
Project maintained by brandomoki
Hosted on GitHub Pages — Theme by mattgraham
State and Props
React Lifecycle
- 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
, componentDidMount
, React Updates
constructor
render
React Updates
componentDidMount
componentDidMount
- What does
componentDidMount
do?
- allows you to execute code when the component is already placed in the DOM
React State Vs Props
- What types of things can you pass in the props?
- What is the big difference between props and state?
- state is handled inside the component and Props are handled outside
- When do we re-render our application?
- What are some examples of things that we could store in state?