requireMeta()function
requireMeta(meta?: PossibleMeta): Meta
| Param | Type | |
|---|---|---|
meta | PossibleMeta | A set of new possible meta data to combine into the current meta context. |
.root | PossibleURL | |
.url | PossibleURI | |
.params | PossibleURIParams | Set the params in the URL (not merged with existing params). - Added to url after it is resolved.- Baseically readonly |
.links | PossibleMetaLinks | Set of input meta <link /> tags in { rel: href } format, before hrefs are resolved. readonly |
.modules | PossibleMetaAssets | Set of input linked assets in (href)[] format, before hrefs are resolved. readonly |
.scripts | PossibleMetaAssets | Set of input linked assets in (href)[] format, before hrefs are resolved. readonly |
.stylesheets | PossibleMetaAssets | Set of input linked assets in (href)[] format, before hrefs are resolved. readonly |
Read the current Meta context, optionally merging in additional meta data.
- Must be called inside a component or hook (reads context via React's
use()).
Examples
const { title, url } = requireMeta();