-
Based off the diagram, what happens first, the ‘render’ or the ‘componentDidMount’?
- Render
-
What is the very first thing to happen in the lifecycle of React?
- Mounting is the first tihng to happen
-
Put the following things in the order that they happen: componentDidMount, render, constructor, componentWillUnmount, React Updates
- constructor, render, componentDidMount, reactupdates componentWillUnmount
-
What does componentDidMount do?
- loads things usaing a network or initializing the DOM.
https://www.youtube.com/watch?v=IYvD9oBCuJI&ab_channel=WebDevSimplified
-
What types of things can you pass in the props?
- you can pass information such as the inital count in a counter imponent. how you want you component to render, such as an item with a title and sub title.
-
What is the big difference between props and state?
- props you pass into a component where state is inside of the component already. State can be updated inside of the component where props can be updadted outside of the component
-
When do we re-render our application?
- when you alter the state then it will rerender the component.
-
What are some examples of things that we could store in state?
- Props are useful to display something that is not hard coded.
- state is useful when you need to use data that is going to be altered by user input, such as a form.
React Docs - State and Lifecycle React Docs - handling events React Tutorial through ‘Developer Tools’ React Bootstrap Documentation Boootstrap Cheatsheet Bootstrap Shuffle - a class “sandbox” Netlify