Next.js Discord

Discord Forum

Recommended way to change document.title based on dynamic content

Answered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
What I'm doing rn is below, and it works. Any reason to not do this?

 return (
    <>
      <title>{`${anime.title}`}</title>
      <div className="flex flex-col gap-y-6"></div>
  </>
)
Answered by joulev
No reasons to not do it. That is fine, react supports that
View full answer

1 Reply