Next.js Discord

Discord Forum

Trying to understand how the "new" app router is working

Unanswered
Ninhache posted this in #help-forum
Open in Discord
Hello, i'm simply trying to understand how it's working :

The new way can handle more functionnalities, the routing is still "simple" as pages router.. but we can add many things :
We could add many "fallback" to our pages now..
We can define a / pages by having this structure :
└── App
    ├── page.js

Add a loading fallback and an error fallback by simply add two files : error.js / loading.js
└── App
    ├── page.js
    ├── error.js
    ├── loading.js

Add a /home now, with an error page..
└── App
    ├── page.js
    ├── error.js
    ├── loading.js
    └── home
       ├── page.js
       ├── error.js


Is this right or i don't understand the new system ..

0 Replies