componentWillUnmount() {
        this.props.socket.unsubscribeObject('*', this.onObjectChange);

        // remove all subscribes
        this.subscribes.forEach(pattern => {
            console.log('- unsubscribe ' + pattern);
            this.props.socket.unsubscribeState(pattern, this.onStateChangeBound);
        });

        this.subscribes = [];
    }
/**
     * Called when component is unmounted.
     */
Called when component is unmounted.
Called when component is unmounted .
componentWillUnmount() {
        this.props.socket.unsubscribeObject('*', this.onObjectChange);
        this.subscribes.forEach(pattern => {
            console.log('- unsubscribe ' + pattern);
            this.props.socket.unsubscribeState(pattern, this.onStateChangeBound);
        });
        this.subscribes = [];
    }
componentWillUnmount ( ) { this . props . socket . unsubscribeObject ( '*' , this . onObjectChange ) ; this . subscribes . forEach ( pattern => { console . log ( '- unsubscribe ' + pattern ) ; this . props . socket . unsubscribeState ( pattern , this . onStateChangeBound ) ; } ) ; this . subscribes = [ ] ; }
Called when component is unmounted.
Called when component is unmounted .
// remove all subscribes