Manage React Component State with Lifecycle Methods

InstructorJoe Maddalone

Share this video with your friends

Send Tweet

The previous lesson introduced the React component lifecycle mounting and unmounting. In this lesson you will learn some simple uses for these hooks and how we can interact with state.

Yu-Shih
~ 6 years ago

Why do you store btnStyle directly on the object, instead of on the state?

Fareez
~ 6 years ago

Hi, are these code examples supposed to be working with the latest version of react? none of the code samples are working for me.

Faria Chowdhury
~ 6 years ago

It's working for me, using react 0.13.2. Here is a working example of the above code: http://jsfiddle.net/faria/d0sycoxv/1/

bradwoods.io
~ 4 years ago

getting an error saying 'component's children should no be mutated'. in button...

Tony Brown
~ 4 years ago

I really like the lessons, everything is becoming clear now.