Created
October 21, 2017 03:37
-
-
Save thebigredgeek/9cd72e083f6bae469b9985f4d5d39815 to your computer and use it in GitHub Desktop.
common class stuff in cs
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
import React, { PureComponent } from 'react'; | |
import { autobind } from 'core-decorators'; | |
export default class Button extends PureComponent { | |
@autobind | |
_handleOnClick (e) { | |
e.preventDefault(); | |
console.log('I was clicked!'); | |
} | |
render () { | |
return <button onClick={this._handleOnClick}>Click meh!</button> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment