411 Week 3 — Material UI and Lifecycle Methods

Monica Suarez
1 min readOct 5, 2020

This week we dive deeper into React, learning about lifecycles as well as component styling using the Material UI library. We will be using what we have learned this week to create our first Checkpoint for the class, a music app.

What are the lifecycles of React? | constructor(), getDerivedStateFromProps(), render(), componentDidMount(), shouldComponentUpdate(), getSnapshotBeforeUpdate(), componentDidUpdate(), componentWillUnmount()

How/when should you use componentDidMount? | It is invoked immediately after a component is rendered. This is where you run statements that requires that the component is already placed in the DOM.

How/when should you use componentDidUpdate? | This method is invoked after the component is updated in the DOM. It can be used to show a status change by console logging it or printing it onto an empty div.

--

--