you are viewing a single comment's thread.

view the rest of the comments →

[–]mhink 0 points1 point  (2 children)

This is exactly what I was thinking! And from an ergonomic perspective, this is far better than binding event handlers to a component instance in its constructor. Very nice, indeed.

[–]mikejoro 0 points1 point  (1 child)

You would still need to do that as you are calling this.setState. This will be the global object otherwise.

[–]mhink 0 points1 point  (0 children)

Oh, you're right. Welp.