Skip to content

Commit

Permalink
Simplify code.
Browse files Browse the repository at this point in the history
  • Loading branch information
reebalazs committed Jun 12, 2016
1 parent 54f7266 commit d8ab7ea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/FormsyText.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ const FormsyText = React.createClass({
},

getInitialState() {
const value = this.controlledValue();
return { value };
return { value: this.controlledValue() };
},

componentWillMount() {
const value = this.controlledValue();
this.setValue(value);
this.setValue(this.controlledValue());
},

componentWillReceiveProps(nextProps) {
Expand Down

0 comments on commit d8ab7ea

Please sign in to comment.