Add getInitialState to README example

This commit is contained in:
Gustavo Saiani 2015-09-21 17:14:15 -03:00
parent 523ab69a4e
commit f559c8f9d4
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ Complete API reference is available [here](/API.md).
/** @jsx React.DOM */
var Formsy = require('formsy-react');
var MyAppForm = React.createClass({
getInitialState: function () {
return {
canSubmit: false
}
},
enableButton: function () {
this.setState({
canSubmit: true