Nested Routes in NextJS
Let's say we have a certain URL,
consisting of several segments,
for example, like this: /user/show/name.
To create a file that will be displayed at this URL, we will need to create several nested folders. In our case, like this:
- /app/
- /user/
- /show/
- /name/
- /show/
- /user/
Let's create the corresponding file:
export default function Name() {
return <p>
user
</p>;
}
Create a file that displays a page at
the following URL: /catg/prod/name.