Closed AquiGorka closed 6 years ago
Also I'm thinking about it and we could probably me more descriptive than "onChange". Maybe "onTogglePlay" or something? In case we have to add other handlers later on.
I prefer the form:
if (typeof this.props.onChange === 'function') { this.props.onChange(...); }
Added
destructuring
with default value, let me know if this is alright with you.I also prefer handling this in
componentDidUpdate
- we can just check if the playing state is different than the last.
Done.
Semicolon would be great. 😉
;)
@benwiley4000 will you let me know when you update on npm
? I have an app eager to use this update ;)
@AquiGorka yep it's out! v0.4.0. 🙂
@benwiley4000 hello again, another PR here:
This changes introduce an onChange prop to listen to changes in the gif state (play/pause).