Skip to content

Commit

Permalink
class component -> functional component (vercel#41089)
Browse files Browse the repository at this point in the history
easier to read

## Documentation / Examples

- [x ] Make sure the linting passes by running `pnpm lint`
- [ x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
  • Loading branch information
2 people authored and Kikobeats committed Oct 24, 2022
1 parent b11f176 commit b11d2a3
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions errors/no-title-in-document-head.md
Expand Up @@ -13,16 +13,14 @@ Within a page or component, import and use `next/head` to define a page title:
```jsx
import Head from 'next/head'

export class Home {
render() {
return (
<div>
<Head>
<title>My page title</title>
</Head>
</div>
)
}
export function Home() {
return (
<div>
<Head>
<title>My page title</title>
</Head>
</div>
)
}
```

Expand Down

0 comments on commit b11d2a3

Please sign in to comment.