Created
June 18, 2016 06:46
-
-
Save Zapix/bddfa20ba5e4468fd6d786ed01abfbf9 to your computer and use it in GitHub Desktop.
Revisions
-
Zapix created this gist
Jun 18, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ class SomeComponent extends React.Component { static propTypes = { action: PropTypes.func, } handleSubmit() { const { action } = this.props; action(); } render() { return ( <form onSubmit={::this.handleSubmit}> <button type="submit">Submit</button> </form> ); } }