diff --git a/src/diff.js b/src/diff.js index 9159b34c..13563913 100644 --- a/src/diff.js +++ b/src/diff.js @@ -13,6 +13,14 @@ export default class DiffComponent extends Component { this.diff = this.diff.bind(this); } + componentWillReceiveProps(props) { + const {value} = props; + + if (value !== this.state.value) { + this.setState({value}); + } + } + onChange(value) { this.setState({ value: value