Home > Software engineering >  React updating state after component has been unmounted (memory leak)
React updating state after component has been unmounted (memory leak)

Time:11-26

I'm building a react app (am a noob at javascript) and struggling with react trying to update a state after the component has been unmounted.

Context for the react app: as part of a school project I have to build a movie ticket booking service for a small theatre complex, on the home page of the web app I have an image 'carousel' which is updating the image every 5 seconds.

Here is the home page in action: https://apollo-9dd16.web.app/

(the image loading time is just because I chose rather large images, will be fixed) - also the loading screen when first accessing the page is because it takes that long to load everything from firebase (everything is dynamically updated through firebase database) if there is a way to make it quicker please let me know

  • Related