Dynamic meta description through props

Author: MiguelMachado-devCreated Jun 5, 2019Updated May 19, 2026

Is there any way that I can set a dynamic meta description thru props? I've created a component to change the Title dynamically

javascript
const HelmetCustom = ({ newtitle }) => (
  <Helmet>
    <title>Dashboard - {newtitle} </title>
    <meta name="description" content="Safe site!" />
    <meta name="keywords" content="react,helmet,dashboard" />
  </Helmet>
);

At my page file I just have to write

javascript
<HelmetCustom newtitle="Home" />

So the title can be easily passed thru props. But, how can I change the description dinamically?! I've tried using Template Strings but seems to not work

react/react-helmet version: 16.8.6/5.2.1