reactjsnext.jsserver-side-renderingmeta-tagsfacebook-sharer

Migrating large React app to nextjs only for social sharing and seo via SSR


I've already developed and deployed ReactJS app with separated front and backend (Laravel).

I'm facing issue with sharing pages with dynamic data due to the disability of react to dynamically generating meta tags, No dynamic preview , no dynamic title .

After searching the web for days the only stable solution found is migrating to NextJs.

my question is can i migrate ( partially ) to Nextjs ?

using Nextjs router for only the sharable pages and preserve the react router for the rest pages? or any other solution other than nextjs for that issue ?


Solution

  • I'm not sure why you want to migrate partially because I think NextJS offers exactly what you want.

    1. It can generate meta tags dynamically (see next/head)
    2. Using Vercel OG, you can even have dynamic OG images (dynamic preview)

    But to answer your question, no you cannot partially migrate to NextJS because it's not just a library. it's a framework.