Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.78 KB

File metadata and controls

45 lines (31 loc) · 1.78 KB

State and Props

React Life Cycle

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

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

  3. The following things in the order that they happen: constructor --> render --> React Updates --> componentDidMount --> componentWillUnmount

  4. What does componentDidMount do? componentDidMount() is invoked immediately after a component is mounted (inserted into the tree). Initialization that requires DOM nodes should go here. If you need to load data from a remote endpoint, this is a good place to instantiate the network request.

cited from https://reactjs.org/docs/react-component.html#componentdidmount

React State Vs Props

  1. What types of things can you pass in the props? The initial count

  2. What is the big difference between props and state? Props: you pass into the component, and state is handled inside of that component

  3. When do we re-render our application? Based if the user changes something

  4. What are some examples of things that we could store in state? Counter, Form

Retrospective

  1. What went well, that I might forget if I don’t write down?

Writing down the definitions of terms.

  1. What did I learn today?

I learned how to create a React App, and how to create and connect compnents together.

  1. What should I do differently next time?

I should write down important terms and techniques, and practice more on writing forEach statements.

  1. What still puzzles me, or what do I need to learn more about?

Callback functions puzzle me a little bit, I need to be comfortable using them.

Is the assignment complete? If not, where exactly did you leave off, and what work remains?

The assignment is complete.