-
-
Save fredericksilva/fd6522f887a145b48f10 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You’d expect this one… | |
render() { | |
return ( | |
<button { ...this.props } className={ this.cn + (this.props.className ? ' ' + this.props.className : '') }> | |
{ this.props.children } | |
</button> | |
); | |
} | |
// …and this another one… | |
render() { | |
return ( | |
<button className={ this.cn + (this.props.className ? ' ' + this.props.className : '') } { ...this.props }> | |
{ this.props.children } | |
</button> | |
); | |
} | |
// …to be the same, right!? Well, guess again… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment