Skip to content

Commit 15653f3

Browse files
authored
Use jsx extension instead of js in global-error documentation (#82710)
1 parent 929d6fa commit 15653f3

File tree

1 file changed

+2
-2
lines changed
  • docs/01-app/03-api-reference/03-file-conventions

1 file changed

+2
-2
lines changed

docs/01-app/03-api-reference/03-file-conventions/error.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ export default function Error({ error, reset }) {
153153

154154
### Global Error
155155

156-
While less common, you can handle errors in the root layout or template using `global-error.js`, located in the root app directory, even when leveraging [internationalization](/docs/app/guides/internationalization). Global error UI must define its own `<html>` and `<body>` tags, global styles, fonts, or other dependencies that your error page requires. This file replaces the root layout or template when active.
156+
While less common, you can handle errors in the root layout or template using `global-error.jsx`, located in the root app directory, even when leveraging [internationalization](/docs/app/guides/internationalization). Global error UI must define its own `<html>` and `<body>` tags, global styles, fonts, or other dependencies that your error page requires. This file replaces the root layout or template when active.
157157

158-
> **Good to know**: Error boundaries must be [Client Components](/docs/app/getting-started/server-and-client-components#using-client-components), which means that [`metadata` and `generateMetadata`](/docs/app/getting-started/metadata-and-og-images) exports are not supported in `global-error.js`. As an alternative, you can use the React [`<title>`](https://react.dev/reference/react-dom/components/title) component.
158+
> **Good to know**: Error boundaries must be [Client Components](/docs/app/getting-started/server-and-client-components#using-client-components), which means that [`metadata` and `generateMetadata`](/docs/app/getting-started/metadata-and-og-images) exports are not supported in `global-error.jsx`. As an alternative, you can use the React [`<title>`](https://react.dev/reference/react-dom/components/title) component.
159159
160160
```tsx filename="app/global-error.tsx" switcher
161161
'use client' // Error boundaries must be Client Components

0 commit comments

Comments
 (0)