Merge pull request #214 from gusaiani/init-state-in-readme

Add getInitialState to README example
This commit is contained in:
Christian Alfoni 2015-10-02 14:56:27 +02:00
commit 4670a9cc1f
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