⊗jsnxPmRtNe 18 of 57 menu

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/

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.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline