Skip to Content
GuidesAdding a Page

Adding a Page

To add a new page to the application:

  1. Create the directory: Create a new folder in app/ (e.g., app/new-page).
  2. Create page.tsx: Add a page.tsx file inside the new directory.
  3. Define the component: Export a default React component from the file.
export default function NewPage() { return ( <div> <h1>New Page</h1> </div> ); }

By default, pages are Server Components. Use "use client" only if you need interactivity or hooks.

Last updated on