hi, i’ve this line App.js
<Switch>
<Route exact path="/" component={Home}/>
<Route path="/movies" component={MoviesPage}/>
<Route path="/tv" component={tvSeriesPage}/>
</Switch>
and on Home i put the Slideshow that have this function
componentDidMount() {
this.slide();
}
slide = () => {
$(".slideshow > .card:gt(0)").hide();
setInterval(() => {
$(".slideshow > .card:first")
.fadeOut(3000)
.next()
.fadeIn(3000)
.end()
.appendTo('.slideshow')
}, 6000)
}
when i open the webisite at the Home, everthing work very well, no problem, after i go on other Router and then come back at Home, where the website reload the API and the other stuff the code gone bad, don’t wait the time for make the fadeIn and FadeOut, come very fast, every second become more fast and make the animation always more faster then before, why?