Skip to main content

Pageexport default FC to display unique UI for next File System Router

aka Pages

/pages to export Pages in Next 12

/app to export Pages in Next 13 (default to Server Component)

References

  1. /pages( Next 12 ) dir to export default Page

  2. page.tsxPage export default UI for Next Route vs dirpath, default Server Component - else "use client" opt-in

  3. Incremental Adoption ↔ (feat) Next 12 compat with Next 13, can migrate individual Page from /pages to /app

  4. layout.tsx( Next 13 ) Page to export default layout UI to share with children

  5. loading.tsx( Next 13 ) Page to export default loading UI on Trigger Suspense Boundary

  6. not-found.tsx( Next 13 ) Page to export default UI for Catch All Route

  7. error.tsx( Next 13 ) Page to export default UI on Trigger Error Boundary

  8. /app( Next 13 ) dir to export Page, allows Colocation

  9. Parallel Route ↔ (feat) Next Router to show Route for 2+ Pages in same view, for independent nav

  10. Shared LayoutUI to share mutliple Pages via children, to preserve state & not trigger re-render

  11. Root Layout ↔ top-level layout.tsx to share across all Pages in App, to define <html\> & <body\>

  12. head.tsx( Next 13 ) Page to export default <head\> for each Page Route

  13. useRouter() ↔ Next Library Hook to return router function to Imperatively navigate within Page

  14. [id].tsx( Next 12 ) FC to export default Page with Dynamic Route with _id URL Parameter

  15. On-demand Revalidation ↔ (feat) to manually purge HTTP Cache for specific ISR Page

  16. /pages/api ↔ dir to map to API endpoint, instead of Page for server-side bundle

  17. Shallow Route ↔ (feat) to change URL w/o repeat Data Fetch for current Page

  18. Index RouteNext.js routes all index.tsx Page to Leaf dir