Dynamically set page title in app router (RSC)

How do I set the browser title dynamically (say using some data from supabase that runs on server side).

I can do it using RSC or client side just don't know how to do this dynamically.
image.png
Solution
https://nextjs.org/docs/app/api-reference/functions/generate-metadata
You can use generateMetadata({ params })
Learn how to add Metadata to your Next.js application for improved search engine optimization (SEO) and web shareability.
Was this page helpful?