T
TanStack14mo ago
graceful-blue

Lazy file and lazy route the route will not mount the component

When I have a lazy file and lazy route the route will not mount the component. It will instead show a empty/blank/white screen. does each .lazy file need a .index file or .route file to avoid a blank page being displayed in your app?
3 Replies
unwilling-turquoise
unwilling-turquoise14mo ago
What do you mean? Do you have a reproduction of this?
graceful-blue
graceful-blueOP14mo ago
I'll try my best to explain it. I can reproduce the issue if I open a new tab go to my localhost:3000. login using email and password upon logging in I am navigated to /conversations. The page will be blank and not have the component for the route mounted. I have added logs to the conversations.lazy.tsx file and if I add a log at the top of the file I will see the log, but if I add a log in the component option of the route I will not see any log. When i refresh the page then the component will mount and I will see my log in the component option of the route. But if i change the file and route to a normal route and not a lazy file or lazy route this issue does not occur.
No description
No description
No description
No description
absent-sapphire
absent-sapphire14mo ago
I also have this issue but have not been able to create a reliable repro example, but the issue does happen quite often for me.

Did you find this page helpful?