fusion-plugin-react-helmet-async
TypeScript icon, indicating that this package has built-in type declarations

2.6.6 • Public • Published

fusion-plugin-react-helmet-async

Build status

Allows adding content into the document head via a component driven api.


Table of contents


Installation

yarn add fusion-plugin-react-helmet-async

Usage

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>
);

Setup

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;
}

Readme

Keywords

none

Package Sidebar

Install

npm i fusion-plugin-react-helmet-async

Weekly Downloads

290

Version

2.6.6

License

MIT

Unpacked Size

157 kB

Total Files

48

Last publish

Collaborators

  • fusion-ci