I've built a Next.JS app that has SSR user profiles and blog articles.
I'm having trouble getting the new Loading UI/loading.js from Next.js 13 to work.
File Structure
pages
├── profiles
│ └── [title].js
│ └── loading.js
│
│
├── articles
│ └──[id].js
│ └──loading.js
│
│
├── index.js
├── _app.js
loading.js Code
export default function Loading() {
return <p>Loading...</p>;
}
I confirmed that my next.js version in package.json
is in fact "next": "13.0.7",
I've tried moving loading.js
to the root pages directory, I've tried moving it into a component and then importing it into _app.js. None of this works.
Thank you in advance!