Skip to content

Commit

Permalink
Update errors/invalid-segment-export.md
Browse files Browse the repository at this point in the history
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
  • Loading branch information
shuding and delbaoliveira committed Oct 31, 2022
1 parent bebbb10 commit 58bd724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion errors/invalid-segment-export.md
Expand Up @@ -2,7 +2,7 @@

#### Why This Error Occurred

Your [layout](https://beta.nextjs.org/docs/api-reference/file-conventions/layout) or [page](https://beta.nextjs.org/docs/api-reference/file-conventions/page) inside the app directory exports an invalid field. In these files, it’s only allowed to export a default component, or Next.js configuration options for layout and pages, such as `revalidate`, `generateStaticParams`, etc.
Your [layout](https://beta.nextjs.org/docs/api-reference/file-conventions/layout) or [page](https://beta.nextjs.org/docs/api-reference/file-conventions/page) inside the app directory exports an invalid field. In these files, you're only allowed to export a default React component, or [Segment Configuration Options](https://beta.nextjs.org/docs/api-reference/segment-config) for layout and pages, such as `revalidate`, `generateStaticParams`, etc.

Other custom export fields are not allowed to avoid typos, as well as using names that can be used as new options by Next.js in the future.

Expand Down

0 comments on commit 58bd724

Please sign in to comment.