Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.