DEV Community

Discussion on: How do you deal with SEO in React/SPAs?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Prerender your website, especially for the meta tags part. This can be done with prerender-spa plugins, Puppeteer / JSDOM, web-scraping, or alike. Make sure it works even with JavaScript disabled.

But, yeah, I actually recommend Next.js with Vercel hosting, or full static generation for hosting elsewhere.

As for a third option, I don't know if Cloudflare can pre-cache meta tags on JavaScript-rendered, or SPA websites.

Collapse
 
johnnyjamesnavarro profile image
Johnny Navarro

Wouldn't Next.js be a little overkill for a SPA? For example a landing page. I've been reading about Gatsby vs Next, but don't know which one would be more suitable for SPAs. My guess would be Gatsby since the website won't be loading dynamic content. What do you recommend?