Reading-Notes
code fellows 301
Read: 02 - State and Props
Reading
React Lifecycle
- Render happens before the component mounts.
- The first thing to happen was the mounting stage. A component is created and put in the DOM.
- Constructor, render, react update, componentDidMount, componentWillUnmount
- ComponentDidMount is where things are loaded from a network request or if you need to initialize the DOM.
React State Vs Props
- Props are what you pass into a function. It is what you want your to initialize your function to.
- Props are passed into components and states are handled inside of components.
- The application is rerendered in the state bsaed on what the user has done.
- You can store counters and forms in state.