React Document Meta [](https://travis-ci.org/kodyl/react-document-meta) [](https://coveralls.io/github/kodyl/react-document-meta?branch=master) [](http://badge.fury.io/js/react-document-meta)
===================
HTML meta tags for React-based apps. Works for both client- and server-side rendering, and has a strict but flexible API.
Built with [React Side Effect](https://github.com/gaearon/react-side-effect)
___________________
Installation
-------------------
```
npm install --save react-document-meta
```
Note: React Side Effect requires React 0.14+ - and so does React Document Meta.
Using with React v0.13
-------------------
Due to several deprecations and breaking changes to React, you'll have to use `react-document-meta@^1.0.0`.
Upgrading from 0.1.x to 1.x
-------------------
As React Side Effect has been upgraded there is a few breaking changes, which is found in the [changelog](CHANGELOG.md).
Features
-------------------
- Supports extending and nesting on any number of levels
- Ability to auto generate some meta tags for open graph, twitter, and more
Usage
-------------------
See `example` folder for a working sample.
```javascript
import React from 'react';
import DocumentMeta from 'react-document-meta';
class Example extends React.Component {
render() {
const meta = {
title: 'Some Meta Title',
description: 'I am a description, and I can create multiple tags',
canonical: 'http://example.com/path/to/page',
meta: {
charset: 'utf-8',
name: {
keywords: 'react,meta,document,html,tags'
}
}
};
return (
Hello World!