Does anyone know why :( in my React component :( this.state is getting set to undefined :(
See class SoundButton
bitbucket.org/runhello/dryad
Conversation
I am following the recommendations for ES6 class based React components, but when handleClick is called this.state is null
2
WHAT
NO
NO
NO NO NO
6
2
8
Replying to
Replying to
rationale is that autobinding behaves too differently compared to plain es6 classes and would confuse new devs
1
1
Show replies
Replying to
More consistent w/ non-React ES6 classes. Our docs still use React.createClass for most examples; will (1/2)
1
(2/2) switch once arrow fns in class property initializer or "autobind" decorator is standard or common.
1
Show replies



