@wbe/react-metas
Version:
React component middleware of MetasManager
49 lines (35 loc) • 1.64 kB
Markdown
# @wbe/react-metas
React component middleware of MetasManager.




## Installation
```shell script
$ npm install -s @wbe/react-metas
```
## How to use
This component is instanciated in render but don't returns DOM (on the same model as React Helmet).
```js
import { Metas } from "@wbe/react-metas";
const App = () => {
return (
<Metas
values={
title={"Hello World!"}
description={"Page description"}
}
/>
)
}
```
## Parameters / Props
Parameters are the same than `MetasManager.inject()` method.
| props | type | description | default value |
| ------------------- | ------------------- | ------------------------------------------------------- | ------------------------------ |
| `values` | `TMetaTags<string>` | metas values objects (check MetasManager documentation) | / |
| `tags` | `TMetaTags<TTag[]>` | metas tags objects (check MetasManager documentation) | MetasManager.DEFAULT_META_TAGS |
| `autoCreateMetaTag` | `boolean` | auto create meta tag | true |
| `autoRemoveMetaTag` | `boolean` | auto remove meta tag | true |
## Returns
null