Please read more about the basics of Response and processing status in forms in the React with documentation. No mixins or anything complicated is required. Also, as stated above, "ReactLink is deprecated as of React v15. The recommendation is to explicitly set the value and change handler, instead of using ReactLink."
Each of your text inputs should have a change handler, as the error message says ... There are many ways to accomplish this, but the basic example is below. See the snippet below on the fiddle here https://jsfiddle.net/09623oae/
React.createClass({ getInitialState: function() { return({ email: "", password: "", passwordConfirmation: "" }) }, submitForm: function(e) { e.preventDefault() console.log(this.state) }, validateEmail: function(e) { this.setState({email: e.target.value}) }, validatePassword: function(e) { this.setState({password: e.target.value}) }, confirmPassword: function(e) { this.setState({passwordConfirmation: e.target.value}) }, render: function() { return ( <form onSubmit={this.submitForm}> <input type="text" value={this.state.email} onChange={this.validateEmail} placeholder="email" /> <input type="password" value={this.state.password} onChange={this.validatePassword} placeholder="password" /> <input type="password" value={this.state.passwordConfirmation} onChange={this.confirmPassword} placeholder="confirm" /> </form> ) } });
Maxwelll
source share