MCPcopy
hub / github.com/nfl/react-helmet / mapStateOnServer

Function mapStateOnServer

src/HelmetUtils.js:620–650  ·  view source on GitHub ↗
({
    baseTag,
    bodyAttributes,
    encode,
    htmlAttributes,
    linkTags,
    metaTags,
    noscriptTags,
    scriptTags,
    styleTags,
    title = "",
    titleAttributes
})

Source from the content-addressed store, hash-verified

618};
619
620const mapStateOnServer = ({
621 baseTag,
622 bodyAttributes,
623 encode,
624 htmlAttributes,
625 linkTags,
626 metaTags,
627 noscriptTags,
628 scriptTags,
629 styleTags,
630 title = "",
631 titleAttributes
632}) => ({
633 base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),
634 bodyAttributes: getMethodsForTag(
635 ATTRIBUTE_NAMES.BODY,
636 bodyAttributes,
637 encode
638 ),
639 htmlAttributes: getMethodsForTag(
640 ATTRIBUTE_NAMES.HTML,
641 htmlAttributes,
642 encode
643 ),
644 link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),
645 meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),
646 noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),
647 script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),
648 style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),
649 title: getMethodsForTag(TAG_NAMES.TITLE, {title, titleAttributes}, encode)
650});
651
652export {convertReactPropstoHtmlAttributes};
653export {handleClientStateChange};

Callers 1

HelmetWrapperClass · 0.90

Calls 1

getMethodsForTagFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…