Skip to content

Instantly share code, notes, and snippets.

@cmilfont
Created August 15, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmilfont/cb8afa7285b2b38a7d05210fe132b721 to your computer and use it in GitHub Desktop.
Save cmilfont/cb8afa7285b2b38a7d05210fe132b721 to your computer and use it in GitHub Desktop.
Fat Arrow Functions
class Form extends React.Component {
handleCreate = () => {
const { dispatch, actions } = this.props;
const type = actions.CREATE;
const payload = this.state;
dispatch({ type, payload });
this.handleClose();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment