From the README.md:
<head> side effects
We expose a built-in component for appending elements to the <head> of the page.
import React from 'react'
import Head from 'next/head'
export default () => (
<div>
<Head>
<title>My page title</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<p>Hello world!</p>
</div>
)
Why does the Head component need to be wrapped in a div? Maybe I'm missing something but that seems very strange considering its final destination is within the head element.
From the README.md:
Why does the
Headcomponent need to be wrapped in adiv? Maybe I'm missing something but that seems very strange considering its final destination is within theheadelement.