Ben Borgers

How to use react-helmet-async with Gatsby

April 23, 2020

When you replace react-helmet with react-helmet-async, you can use the Gatsby plugin @rhysforyou/gatsby-plugin-react-helmet-async to make it work with Gatsby.

Just install the plugin:

npm install @rhysforyou/gatsby-plugin-react-helmet-async

And include the plugin in gatsby-config.js:

module.exports = {
  plugins: [

Now, you can use react-helmet-async in your Gatsby site:

import React from "react"
import { Helmet } from "react-helmet-async"

export default () => {
  return (
      <title>Candlemaker Corner</title>

Subscribe to my newsletter!

A weekly round-up of new blog posts and updates to projects I’m working on.