← Help

React

Get started with integrating Mosaic into your React project.

Step 1

First, install React Helmet:

npm install react-helmet

Step 2

Then, you can use it in your React component like this:

import React from 'react'
import { Helmet } from 'react-helmet'

export default function Page() {
  return (
    <div>
      <Helmet>
        <meta property="og:title" content="Your Page Title" />
        <meta property="og:description" content="Your page description" />
        <meta property="og:image" content="https://mosaicimg.com/use?url=yourwebsite.com" />
        <meta property="og:type" content="website" />
      </Helmet>
      <h1>Your Page Content</h1>
      {/* Rest of your page content */}
    </div>
  )
}

Step 3

Remember to replace the placeholder values (like 'Your Page Title' and 'yourwebsite.com') with your actual page title and website URL.