Next.js Discord

Discord Forum

Loading.tsx reloading and blinking the page

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
Hello! I added a loading.tsx showing the message "Loading..." and from that moment on my site started to reload and blink

14 Replies

should move your skeleton to loading.tsx…
@DirtyCajunRice | AppDir should move your skeleton to loading.tsx…
Sloth bearOP
In the video, I'm not the one reloading the page.
After placing loading.tsx, the site kept reloading infinitely, blinking
This is the problem
@Sloth bear This is the problem
ah. that wasnt apparant. can you paste your code
@DirtyCajunRice | AppDir ah. that wasnt apparant. can you paste your code
Sloth bearOP
The project is a little big, but it doesn't have any API calls, async, or anything
export default function Loading() {
  return <p>Loading...</p>
}


This is the loading file in app folder
I am using next ui + tailwind
@DirtyCajunRice | AppDir are you on 14.1.0
Sloth bearOP
Yep!
@Sloth bear Yep!
um… well… if you have no async why are you using loading.tsx…?
loading.tsx is for an async page.tsx that is fetching
@DirtyCajunRice | AppDir um… well… if you have no async why are you using loading.tsx…?
Sloth bearOP
Hmm, I understand. But wouldn't it be strange for that to happen?
@Sloth bear Hmm, I understand. But wouldn't it be strange for that to happen?
no… i have no idea what it would do when its being misused haha