Why is it that when clientRoutes is true, if you enter any page on the url, the screen will be blank
Unanswered
Thai posted this in #help-forum
ThaiOP
Why is it that when clientRoutes is true, if you enter any page on the url, the screen will be blank and then it will render the interface, but if it's false, it runs normally???
22 Replies
that looks a little "wild".. I recommend you using layouts as you do, but use the layout from app directory. I think that would help you clean up the mess 🙂
you can read more about it here: https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts
Is there any other solution bro?
yea, I saw that you using page router. Pages router is not recommended for layouts. App router support layouts nativly and is build for that
ThaiOP
Once it finished downloading the js, I ran it again normally, but the first time it loaded, it stuttered for about 1 second before displaying.
@Thai Is there any other solution?
I don't know any other in pages router
@B33fb0n3 I don't know any other in pages router
ThaiOP
Entering directly on the url but in the Link will work normally
@B33fb0n3 I don't know any other in pages router
ThaiOP
This is the router
_app.js
@B33fb0n3 I don't know any other in pages router
ThaiOP
Is there a solution?
Idk what you saying that its blank page then renders
I used to do like this
@West African Crocodile I used to do that
ThaiOP
The first time I enter the URL, clientRoutes is true, it displays a white UI, and then the web UI is displayed. When it's false, it's normal. Currently, I'm having trouble entering it on the URL when it's true. I want it to not have a blank UI. but it must be displayed, but using Link is normal, appropriate when entering a URL
Can you explain more clearly, when I /dashboard it has the above situation
@Thai The first time I enter the URL, clientRoutes is true, it displays a white UI, and then the web UI is displayed. When it's false, it's normal. Currently, I'm having trouble entering it on the URL when it's true. I want it to not have a blank UI. but it must be displayed, but using Link is normal, appropriate when entering a URL
West African Crocodile
if its white are u using server side props?
@West African Crocodile if its white are u using server side props?
ThaiOP
Completely client-side
Please show me the solution
@Thai Completely client-side
West African Crocodile
Did u try at production level