Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Commit 705a9c4

Browse files
author
rsavian
committed
Rename submit method name and change to use bind.
1 parent 06bb397 commit 705a9c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/views/contact/ContactForm.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import {reduxForm, Field} from 'redux-form';
33

44
class ContactForm extends React.Component {
55

6-
_handleSubmitHandler = (formData) => this._onFormSubmit(formData);
6+
_onSubmitHandler = this._onSubmit.bind(this);
77

88
render() {
99
const {handleSubmit, reset} = this.props;
1010

1111
return (
12-
<form onSubmit={handleSubmit(this._handleSubmitHandler)}>
12+
<form onSubmit={handleSubmit(this._onSubmitHandler)}>
1313
<div className="form-group">
1414
<Field
1515
component={this._renderInputField}
@@ -98,7 +98,7 @@ class ContactForm extends React.Component {
9898
);
9999
}
100100

101-
_onFormSubmit(formData) {
101+
_onSubmit(formData) {
102102
console.info(formData);
103103

104104
window.alert(JSON.stringify(formData, null, 2)); // eslint-disable-line no-alert

0 commit comments

Comments
 (0)