Ben Borgers

⇢ Twitter

How to add things to the HTML head with React Static

React Static comes with a built-in Head component, which allows you to add content to the HTML <head> element. It’s powered by React Helmet.

import { Head } from 'react-static'

export default () => {
	return (
		<div>
			<Head>
				<title>Here is the page title</title>
			</Head>

			<div>
				the page content
			</div>
		</div>
	)
}

--

Last updated April 7, 2021