I'm using react-helmet to give each of my pages a unique title and description for my React application. The title is rendering correctly in the browser tab and the title and description are rendering correctly when I inspect the page using Dev Tools. However, Google isn't showing either the title or description in their search results. What am I doing wrong?
I've looked into using prerender.io but as my site doesn't have a backend (it's just a marketing site for the moment) I'm not sure it's a good solution. I've removed some elements, but this is essentially how my code looks...
import React, {Component} from 'react';
import {Helmet} from "react-helmet";
class Home extends Component {
render() {
return (
<div>
<Helmet>
<title> My title </title>
<meta name="description" content="My description"/>
</Helmet>
</div>
)
}
}
export default Home;