Need Assistance?

support@tutorialshub.in

App Router & File-Based Routing

How File-Based Routing Works

ADVERTISEMENT
Next.js Free Lesson
5 min read
ADVERTISEMENT

In Next.js, you never have to write a giant routing config file. Instead, folders define URL segments, and a special file named page.jsx makes that folder publicly accessible as a page.

For example, creating app/about/page.jsx immediately creates the URL /about. Any helper components you put inside app/about/ that are not named page.jsx stay private and won't become routes.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you