Next.js Discord

Discord Forum

Next app dir loading page twice

Unanswered
Perro de Presa Mallorquin posted this in #help-forum
Open in Discord
Perro de Presa MallorquinOP
Hey all, I've noticed strange behavior when doing a hard reload (or loading for the first time) a page in Next's app dir.

The content of the page first loads nearly immediately, but then after a moment it gets blown away and then loads in again, almost as if the entire page is being unmounted and mounted again. I've attached a video showing what I mean.

Anyone come across this before or have an idea on what it could be?

13 Replies

@joulev you need to give us some code, a video recording can't help with debugging
Polar bear
doesn't it have sth to do with caching
cuz there's no way in local dev it loads this fast
as an initial load
the issue here is not related to caching or dev mode
but without code i cannot say further than that
@joulev the issue here is not related to caching or dev mode
Polar bear
oh it's when normally refreshing, thought only initial load
Perro de Presa MallorquinOP
Yeah unfortunately can't really provide any code. Was hoping someone may have just run into it before. Thanks anyway!
also my rationale on why i need a minimal reproduction (not your work repo)
@joulev see https://nextjs-discord-common-questions.joulev.dev/how-to-create-a-minimal-reproduction-repository
Polar bear
same for u?
Perro de Presa MallorquinOP
Yeah I understand, no worries. & no that link loaded fine for me.