Seriously. Doing SEO with React isn’t that easy because you don’t really control the <head />
tag and you need to plug this with server-rendering. Not that easy.
There is a really cool package that the NFL did called react-hetmet. It allows you to change anything in the <head />
within your React components. You go there, the page title and description change. Boom. Really easy to use. I really encourage people here to go learn more about react-helmet.
I love it so much that I decided to plug it inside reactrouter:react-router-ssr. If you add the nfl:react-helmet
package to your project, the react-router-ssr will detect it and serve it in the header when doing server-rendering.
If you though building something with React and being SEO-friendly was impossible or really hard work, now it’s that simple :). I’ve updated my kickstart examples so that you can have a few examples.
Hopefully it will help many other folks here