akiran / akiran/react-slick

Child components unmounting and remounting

Aperta
#2,074 1 commento 4 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
11.9k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Guidelines for posting a new issue

* Please replicate your issue with this [CodeSandBox](https://codesandbox.io/s/ppwkk5l6xx) and provide a link to it along with the issue description

The Slider component seems to unmount and the remount all its children. At least all the numbers appearing twice in the console indicates so. I have a component that does some fetch requests in the useEffect(()=>...,[]) part but because of the mentioned behavior my components are make API calls 2 times. I don't know if it is an expected behavior or not.

Sandbox Link: https://codesandbox.io/s/react-slick-playground-forked-oqbhv
![image](https://user-images.githubusercontent.com/46436051/130781682-f2a9b3cc-ddf2-4496-922e-645525bf11f6.png)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.