Next.js Discord

Discord Forum

A header with customisations

Unanswered
Filipino Venus posted this in #help-forum
Open in Discord
Filipino VenusOP
He everyone : 👋
I am new to Next JS and I'd like to hear your thoughts on my case.
I use NextJS 14. Initially, I had a static header and I put it in the root layout.
As the project grows the header becomes more and more complicated.
Now I faced an issue when some pages have the standard header and some pages contain breadcrumbs in the header.
Breadcrumbs require data fetching based on page params. Also, I want breadcrumbs to be a server component which means I can't use useParams() hook
For me it looks like I can't keep the breadcrumbs in layout anymore. One of the reasons is that
/products page has the standard header
/products/item page has the header with breadcrumbs

Does it mean that I have to define headers by page? What do you think? 🤔

#vercel-help

0 Replies