Head

  • Last Head to be rendered wins if there is a key

import Head from "next/head";

function App() {

return (<>
<Head>
  <title>{conf.get("PROJECT_NAME")}</title>
  <meta
    name="description"
    content="Learn & earn to solidify your financial future"
  />
  <meta
    name="viewport"
    content="width=device-width, initial-scale=1"
  />
  <link rel="icon" href="/favicon.ico" />
</Head>
  </>);
  }

Script

Prop
Example
Type
Required

src="http://example.com/script"

String

Required unless inline script is used

strategy="lazyOnload"

String

-

onLoad={onLoadFunc}

Function

-

onReady={onReadyFunc}

Function

-

onError={onErrorFunc}

Function

-

strategy

  • beforeInteractive: Load before any Next.js code and before any page hydration occurs.

  • afterInteractive: (default) Load early but after some hydration on the page occurs.

  • lazyOnload: Load during browser idle time.

  • worker: (experimental) Load in a web worker.

Last updated