React-Router changes URL but the component doesn't render (in Dev) #83
Replies: 7 comments 16 replies
-
It depends on which version you started your project with, but I did have this issue some time ago. I believe I fixed it using the Essentially, what is happening is a race condition; in DEV you have a lot of extra fluff working, and React gets caught in a rendering trap. PROD assets are a lot slimmer, and more performant, so React works as intended. But in actuality, I should have been using the |
Beta Was this translation helpful? Give feedback.
-
This is what I see when I throttle my connection, on a basically new install (it has new features, but those are all on the Sails side). Screen.Recording.2023-01-11.at.12.27.28.AM.mov |
Beta Was this translation helpful? Give feedback.
-
You can do a fresh install next to what you've built, and just transfer over what you need to change. That would be my route. I'm not sure why your page wouldn't load. I'm assuming you aren't getting any errors in the console? One more thought... Are you using the |
Beta Was this translation helpful? Give feedback.
-
Only thing I can think of to help track down the issue, is using Past that, without being able to see the codebase, I don't know how much more I can help. |
Beta Was this translation helpful? Give feedback.
-
Have you made any progress on this? |
Beta Was this translation helpful? Give feedback.
-
Was there ever progress on this? |
Beta Was this translation helpful? Give feedback.
-
Was there ever progress on this @MaheshkumarSundaram ? |
Beta Was this translation helpful? Give feedback.
-
Hi @neonexus,
In production build, this is not issue as Sails handles routing.
In dev, after successful login, the router changes the URL but the dashboard is not rendered. Only the Navbar is rendered initally. If I refresh manually, then it works.
Do you reckon why this issue might occur?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions