Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ratson/react-head-tags
ReactDOMServer.renderToNodeStream() ready component to manage document.head
https://github.com/ratson/react-head-tags
head meta react react-helmet ssr stream tags
Last synced: about 1 month ago
JSON representation
ReactDOMServer.renderToNodeStream() ready component to manage document.head
- Host: GitHub
- URL: https://github.com/ratson/react-head-tags
- Owner: ratson
- Created: 2017-12-21T16:42:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T16:03:14.000Z (almost 7 years ago)
- Last Synced: 2024-10-19T01:16:00.991Z (3 months ago)
- Topics: head, meta, react, react-helmet, ssr, stream, tags
- Language: JavaScript
- Size: 23.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-head-tags
ReactDOMServer.renderToNodeStream() ready component to manage document.head
## Installation
```
npm install react-head-tags --save
```## Usage
```js
import React from 'react'
import { renderToNodeStream } from 'react-dom/server'
import { HeadManager, HeadTags } from 'react-head-tags'let headTags
const contentStream = renderToNodeStream(
{
headTags = tags
}}
>
Title
,
)
```Note that head tags are not collected before the app is rendered,
e.g. `headTags` is `undefined` until `contentStream` is finished in the above example.