reading-notes

Think you might be in the wrong place? Go home!

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

Render happens first

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

The very first thing to happen in the lifecycle of a React component is the “constructor” method. The constructor is called when a component is being created and initialized. It’s the right place to initialize state and bind event handlers.

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

 Constructor, react updates, render, componentDidMount, componentWillUnmount

What does componentDidMount do?

The __componentDidMount__ method is part of the React component lifecycle. It is called after a component has been rendered to the screen. This is a good place to perform tasks that require interaction with the DOM or external data fetching, such as initiating AJAX requests to load data.

What types of things can you pass in the props?

What is the big difference between props and state?

When do we re-render our application?

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

Information gathered using ChatGPT