Skip to content

Instantly share code, notes, and snippets.

@carlosble
Created April 2, 2017 22:15
Show Gist options
  • Save carlosble/0c28de1038ba9032506ec74ddafc299b to your computer and use it in GitHub Desktop.
Save carlosble/0c28de1038ba9032506ec74ddafc299b to your computer and use it in GitHub Desktop.
Invoking action from component
onSubmit(event) {
event.preventDefault();
let notifier = this.props.notifier;
this.props.actions.saveProfile(this.props.profile).then((success)=>{
notifier.showSuccess(success);
}, (error) => {
notifier.showError(error);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment