componentWillUnmount() {
    window.removeEventListener('scroll', this.setContentState)
    window.removeEventListener('resize', this.setWidth)
    window.removeEventListener('load', this.setWidth)
  }
/**
   * Remove all the event listeners added on mount when the component unmounts.
   * @return {void}
   */
Remove all the event listeners added on mount when the component unmounts.
@return {void}
Remove all the event listeners added on mount when the component unmounts . @return { void }
componentWillUnmount() {
    window.removeEventListener('scroll', this.setContentState)
    window.removeEventListener('resize', this.setWidth)
    window.removeEventListener('load', this.setWidth)
  }
componentWillUnmount ( ) { window . removeEventListener ( 'scroll' , this . setContentState ) window . removeEventListener ( 'resize' , this . setWidth ) window . removeEventListener ( 'load' , this . setWidth ) }
Remove all the event listeners added on mount when the component unmounts.
Remove all the event listeners added on mount when the component unmounts .