react-image-slider
react-image-slider copied to clipboard
Performance/Unmount issue
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 });
}
}
Thank you for reporting @gabrielmicko. I will be doing some refactors in following days and definitely fix this issue.
Hi,
I saw 'visibleItems' attribute not working