Remember to unregister on unmoun
This commit is contained in:
@@ -29,7 +29,11 @@ export default class CreateOrReuseChatDialog extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this._onNewDMClick = this._onNewDMClick.bind(this);
|
||||
dis.register(this._onAction.bind(this));
|
||||
this.dispatcherRef = dis.register(this._onAction.bind(this));
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
dis.unregister(this.dispatcherRef);
|
||||
}
|
||||
|
||||
_onAction(payload) {
|
||||
|
||||
Reference in New Issue
Block a user