Metatags in NextJS
Unanswered
American posted this in #help-forum
AmericanOP
How can I add specific Metatags for different pages in NextJS if I'm already using 'use client' for those pages for which I wanted to add specific meta tags?
7 Replies
Asian black bear
You can always just add custom meta tags in your markup. React hoists them to the head. Havin said that, your pages shouldn't be client components. It's a total anti pattern.
@Asian black bear You can always just add custom meta tags in your markup. React hoists them to the head. Havin said that, your pages shouldn't be client components. It's a total anti pattern.
AmericanOP
I used 'client' to make works Bootstraps js
there's no any other way then?
@American I used 'client' to make works Bootstraps js
Asian black bear
This sounds wrong and it's likely that you should do integrate the library differently.
AmericanOP
I'll give a try again
Asian black bear
There will technically never be a need to mark pages as client components as you opt out of pretty much all app router and RSC features by doing so.
Regardless of this you can always hoist metatags in any component for the purposes of your original question.