Skip to content

Commit 562843f

Browse files
author
hongarc
committed
fix: CommandView don't need to unmount itself
1 parent 9f2c599 commit 562843f

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/js/react_views/CommandView.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@ class CommandView extends React.Component{
1515

1616
componentDidMount() {
1717
this.props.command.on('change', this.updateStateFromModel, this);
18-
this.props.command.on('destroy', this.onModelDestroy, this);
1918
this.updateStateFromModel();
2019
}
2120

2221
componentWillUnmount() {
2322
this.props.command.off('change', this.updateStateFromModel, this);
24-
this.props.command.off('destroy', this.onModelDestroy, this);
25-
}
26-
27-
onModelDestroy() {
28-
ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this).parentNode);
2923
}
3024

3125
updateStateFromModel() {

0 commit comments

Comments
 (0)