react-image-slider icon indicating copy to clipboard operation
react-image-slider copied to clipboard

Performance/Unmount issue

Open gabrielmicko opened this issue 8 years ago • 2 comments

When I navigate somewhere else and the slider gets unmounted the animate interval wont stop.

FIX:

componentWillUnmount() {
    window.removeEventListener('resize', this.setVisibleItems.bind(this, this.props.visibleItems));
    if (this.state.interval) {
      clearInterval(this.state.interval);
      this.setState({ interval: null });
    }  
  }

gabrielmicko avatar Nov 22 '16 23:11 gabrielmicko

Thank you for reporting @gabrielmicko. I will be doing some refactors in following days and definitely fix this issue.

azimgd avatar Nov 23 '16 09:11 azimgd

Hi,

I saw 'visibleItems' attribute not working

phanthinh avatar Jul 30 '17 03:07 phanthinh