Adding a Page
To add a new page to the application:
- Create the directory: Create a new folder in
app/(e.g.,app/new-page). - Create
page.tsx: Add apage.tsxfile inside the new directory. - 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