Allows adding content into the document head via a component driven api.
yarn add fusion-plugin-react-helmet-async
This plugin is a simple wrapper on the react-helmet-async
module which handles
the context provider and server side code for you.
import {Helmet} from 'fusion-plugin-react-helmet-async';
const app = (
<App>
<Helmet>
<title>Hello World</title>
<link rel="canonical" href="https://www.tacobell.com/" />
</Helmet>
<h1>Hello World</h1>
</App>
);
This module has no dependencies or configuration. Simply register the plugin.
// src/main.js
import App from 'fusion-react';
import HelmetPlugin from 'fusion-plugin-react-helmet-async';
import Root from './components/root';
export default async function main() {
const app = new App(<Root />);
app.register(HelmetPlugin);
return app;
}