Change page

Hi, I'm a beginner and I don't know why page2 isn't found when I use <Link href={"/page2"} can somebody help me understand please?
No description
2 Replies
Paito01
Paito015mo ago
Hey @Edgar24 Routing in Nextjs works through folder names and file names (like page.tsx or layout.tsx). To define the route /page2 Your file structure should be app/page2/page.tsx Here’s more info in the nextjs docs 🙂 https://nextjs.org/docs/app/building-your-application/routing/defining-routes
Routing: Defining Routes | Next.js
Learn how to create your first route in Next.js.
Edgar24
Edgar24OP5mo ago
Thanks!!! I appreciate your answer. I was able to figure it out but K didn’t know how to delete my question. Hope it helps someone else 🙂
Want results from more Discord servers?
Add your server