Skip to content

Commit

Permalink
Delete 02-page.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
delbaoliveira committed Dec 12, 2024
1 parent 89d9589 commit e0fded7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 59 deletions.
58 changes: 0 additions & 58 deletions docs/01-app/03-building-your-application/01-routing/02-pages.mdx

This file was deleted.

9 changes: 8 additions & 1 deletion docs/01-app/04-api-reference/03-file-conventions/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: page.js
description: API reference for the page.js file.
---

The `page` file is used to define a page in your Next.js application.
The `page` file allows you to define UI that is **unique** to a route. You can create a page by default exporting a component from the file:

```tsx filename="app/blog/[slug]/page.tsx" switcher
export default function Page({
Expand All @@ -23,6 +23,13 @@ export default function Page({ params, searchParams }) {
}
```

## Good to know

- The `.js`, `.jsx`, or `.tsx` file extensions can be used for `page`.
- A `page` is always the **leaf** of the route subtree.
- A `page` file is required to make a route segment **publicly accessible**.
- Pages are [Server Components](https://react.dev/reference/rsc/server-components) by default, but can be set to a [Client Component](https://react.dev/reference/rsc/use-client).

## Reference

### Props
Expand Down

0 comments on commit e0fded7

Please sign in to comment.