Merge pull request #214 from gusaiani/init-state-in-readme
Add getInitialState to README example
This commit is contained in:
commit
4670a9cc1f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue