After rendering multiple times, even if no settings were changes for the react-slick slider, the slider completely stops working. No button clicks, no swipes work, and the slider is completely stopped. Here is the problem occuring:
var ReactSlickDemo = React.createClass({
getInitialState: function(){
return {count: 0};
},
componentDidMount: function(){
var that = this;
setInterval(function(){
that.setState({count: that.state.count + 1});
},800);
},
render: function() {
var settings = {
dots: true
}
return (
<div className='container'>
<Slider {...settings}>
<img src='http://placekitten.com/g/400/200' />
<img src='http://placekitten.com/g/400/200' />
<img src='http://placekitten.com/g/400/200' />
<img src='http://placekitten.com/g/400/200' />
</Slider>
</div>
);
}
});
ReactDOM.render(
<ReactSlickDemo />,
document.getElementById('container')
);
jsfiddle : https://jsfiddle.net/20bumb4g/727/
To reproduce, click the next and/or previous buttons until you notice that nothing is working anymore. All the code is doing is re-rendering the given component about every second.
Expected when rerendering: The react-slider show continue working, including all buttons.
Actual Result: The react-slider stops sliding and no buttons work anymore.