Home > other >  Infinite loading for a ReactJS app despite me having lazy loading
Infinite loading for a ReactJS app despite me having lazy loading

Time:01-16

Soo. I am getting an infinite loading screen when I start my react app. Eventually after waiting like 2 minutes it says Error code: Out of Memory. I tried lazy loading with seperate components in seperate files and it stills does the same thing. If you want to see the code, https://github.com/SupaSibs/social-media-network/tree/Supa-Branch/client/website/src

CodePudding user response:

You are using the <Posts /> tag in the Posts class which means you call this class in itself. Which creates a infinite loop. You just need to rename your posts component and import it so it is not the same name as the Posts root class.

  •  Tags:  
  • Related