Don't. Use title inside Head from next/head instead.
Hi, do you mean to use the Head tag and title tag inside every page?
Would it be possible to have the Head tag in the layout component and pass the title variable somehow when you are doing Page.Layout = MyLayout?
Yes I meant that.
It is possible but it adds an unnecessary complexity imho.
What if you want to pass a prop to the MyLayout so that you can let your nav component know what page you are on? How do you pass props to MyLayout?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Don't. Use title inside Head from next/head instead.
Hi, do you mean to use the Head tag and title tag inside every page?
Would it be possible to have the Head tag in the layout component and pass the title variable somehow when you are doing Page.Layout = MyLayout?
Yes I meant that.
It is possible but it adds an unnecessary complexity imho.
What if you want to pass a prop to the MyLayout so that you can let your nav component know what page you are on? How do you pass props to MyLayout?