5.11.0 • Published 6 years ago

react-cap v5.11.0

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

react-cap

A fork of react-helmet

its react-helmet, with the data-react-helmet attribute removed

  • No longer uses data-react-helmet attributes
  • Assumes all HTML metadata is assigned using this package
  • To prevent react-cap from removing metadata assigned not using react-cap:
    • apply attribute data-ignore-metadata to an html element to prevent it being removed
    • apply attribute data-ignore-metadata="attrName,attrName" to an html element to prevent modification of specific attributes

This package was originally created to support using HTML <head> metadata with the react v16 streaming interface. See react-html-metadata for an implementation that supports react server side streaming.

Install

NPM
npm install --save react-cap
Yarn
yarn add react-cap

Usage

import Helmet from 'react-cap';

For more documentation, see react-helmet documentation Usage is exactly the same as react-helmet.

Usage with webpack style-loader

To prevent the webpack <style> tags from being removed, you must configure the style-loader with an ignore attribute.

{
  test: /\.css$/,
  use: [
    { loader: 'style-loader', options: { attrs: { data-ignore-metadata: true } } }
  ]
}

Usage with webpack css-loader

Its recommended you utilize asset files to apply css stylesheets using react-cap

License

MIT

5.11.0

6 years ago

5.10.0

6 years ago

5.9.0

6 years ago

5.8.0

6 years ago

5.7.0

6 years ago

5.6.0

6 years ago

5.5.2

6 years ago

5.5.1

6 years ago

5.5.0

6 years ago

5.4.0

6 years ago

5.3.3

6 years ago

5.3.2

6 years ago

5.3.1

6 years ago

5.3.0

6 years ago

5.2.3

6 years ago

5.2.2

6 years ago