pending component flashing on screen no matter what I do. Is it possible to make it show only below the navbar? #4827
-
I've read several somewhat similar issues on this but don't see anything that works. I've tried setting defaultPendingMs and defaultPendingMinMs to 0. No cigar. I have autoCodeSplitting enabled, and am currently using no beforeLoad or loader anywhere in my code. But whenever I refresh the page, my pendingComponent flashes on the screen. My But in my case, when I refresh the page it flashes on screen below the navbar (which is how I want it to do), but then it flashes again and covers the whole screen. I'm hoping someone more experienced with TSR will be able to point me in the right direction, since I'm thinking this might be a common issue. I can try and make a stackblitz if necessary but hopefully it won't come to that. I have the following main.tsx:
And root.tsx:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
really a complete minimal example would help |
Beta Was this translation helpful? Give feedback.
Figured it out. I had a lazy import for a heavy Map component higher up in the tree and didn't have any
<Suspense>
wrapping it. Somehow this worked as intended when I was using React Router but I wrapped it in a Suspense and it's working great. Sorry to bother