Render the <head /> element dynamically in Next.js

InstructorXiaoru Li

Share this video with your friends

Send Tweet

Next.js treats single-file components in the /pages/ directory as pages, so we need to work around this abstraction to access and modify the <head> element of the page. In this lesson, we will learn how to render the <head> element dynamically with a constantly updated title in Next.js 9, and see how this feature can be helpful for loading custom fonts.