Replies: 5 comments 3 replies
-
If you are using Create a new app/layout.tsx file inside the app directory. This is a root layout that will apply to all routes inside app.
The app directory must include a root layout. If you are using Usage
Good to know |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Yes please, I've experimented on this and found the following:
|
Beta Was this translation helpful? Give feedback.
-
The closest thing that I found is defining a component Loading.tsx, importing it inside my folder and exporting it
|
Beta Was this translation helpful? Give feedback.
-
Just stumbled into this, the way I handled this was to wrap the children from the root layout with a Suspense and have the fallback be the loading component.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
I'm just trying out Next.JS and found it strange that you must define a loading.tsx component for each page separately for it to show. I'd like for it to be possible show a single loading component between every single page in the app without the need to create a separate
loading.tsx
file for each pageProposal
Not sure how to implement this but I'm interested in contributing to this.
Beta Was this translation helpful? Give feedback.
All reactions