0

I actually have no idea where the problem is coming from, that is why I am not applying any code, I tried a lot of things, but it just doesn't seem to work. When I load my app in the browser (doesn't matter which), and when I visit 7 or more different routes, the app starts to make the browser laggy, like the loaders are not running smoothly, other animations just freeze and skip over loaders etc. And when you click to go on a new route it renders directly but there is a freeze for a short time and then the component is rendered. I am open to ideas guys, thank you in advance.

Edit: I forgot to add that I am using react-slingshot.

Stiliyan
  • 176
  • 11
  • How do you expect anyone to solve your problem when we can't see your code? If this was a problem with React, it wouldn't have been shipped – hellogoodnight Jun 03 '19 at 11:26
  • Well tell me, how do you expect me to paste all of my apps code here ? I can show you what you want to see, I can't show everything, and god knows where the problem is, you expect me to share you approximately 300k lines of code :D .. – Stiliyan Jun 03 '19 at 11:30

1 Answers1

1

Without any code snipped reproducing the issue is difficult to tell where is the problem. The most common problems that can produce this issue are:

  • Using redux and retrieving the entire tree in every container
  • Adding event listeners in a component without removing it in componentWillUnmount
  • Render big components that are re-rendered often (keypress, onScoll, onChange etc etc)

If you can post a full working snipped reproducing the problem I can provide further help.

Mosè Raguzzini
  • 15,399
  • 1
  • 31
  • 43
  • Alright I will test the theories out, I think in redux I am retrieving the whole tree in every container. – Stiliyan Jun 03 '19 at 11:31
  • 1
    The problem really was that I am retrieving the entire tree in every container, thanks a lot :) – Stiliyan Jun 18 '19 at 12:11