React Component Lifecycle

Lawson Hung
1 min readOct 2, 2020

--

This was something I had learned before, but was struggling to really memorize so I thought I’d blog about it.

I was just confused about when render would fire. As you can tell from the diagram, render fires before componentDidUpdate and componentDidMount.

Render also fires when passed new props or the state is set again. This diagram is pretty helpful for me to understand when render is fired, so I know what to put in there. forceUpdate is something I heard I should not use unless absolutely necessary, which is basically almost never.

That’s all for this week! Stay safe, maintain social distancing, wear a mask and wash your hands often!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Lawson Hung
Lawson Hung

No responses yet

Write a response