Home > AI > Frontend > react-helmet >

dynamically change page metas

Use react-helmet

npm i react-helmet
import { Helmet } from 'react-helmet';

function App() {
  return (
    <>
    <Helmet>
        <title>App Title</title>
        <meta name="description" content="App Description" />
        <meta name="theme-color" content="#008f68" />
    </Helmet>

    <Content />
    </>
  );
}

export default App;
Related posts:
    No posts found.

Leave a Reply