@wbe/react-metas
v2.3.0
Published
React component middleware of MetasManager
Downloads
22
Readme
@wbe/react-metas
React component middleware of MetasManager.
Installation
$ 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).
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