import { createElement, startTransition } from 'react'; import { createRoot, hydrateRoot } from 'react-dom/client'; import StaticHtml from './static-html.js'; function isAlreadyHydrated(element) { for (const key in element) { if (key.startsWith('__reactContainer')) { return key; } } } export default (element) => (Component, props, { default: children, ...slotted }, { client }) => { if (!element.hasAttribute('ssr')) return; const renderOptions = { identifierPrefix: element.getAttribute('prefix'), }; for (const [key, value] of Object.entries(slotted)) { props[key] = createElement(StaticHtml, { value, name: key }); } const componentEl = createElement( Component, props, children != null ? createElement(StaticHtml, { value: children }) : children ); const rootKey = isAlreadyHydrated(element); // HACK: delete internal react marker for nested components to suppress aggressive warnings if (rootKey) { delete element[rootKey]; } if (client === 'only') { return startTransition(() => { createRoot(element).render(componentEl); }); } return startTransition(() => { hydrateRoot(element, componentEl, renderOptions); }); }; _actions/github/codeql-action-3.25.10'>dependabot/github_actions/github/codeql-action-3.25.10 Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/CONTRIBUTORS (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2018-05-16Vendor update with github.com/ugorji/go and github.com/apache/thrift pinning ...Gravatar Yong Tang 10682-4047998/+37388
2018-05-16Dep ensure (#1803)Gravatar Miek Gieben 10377-54910/+4225825
2018-05-16Probe simplification (#1784)Gravatar Ruslan Drozhdzh 1-49/+42
2018-05-15plugin/tls: make CA parameter optional (#1800)Gravatar Ruslan Drozhdzh 2-3/+5
2018-05-11plugin/reload: mention auto in reload (#1793)Gravatar Chris O'Haver 1-0/+3
2018-05-11plugin/proxy: fix except example (#1796)Gravatar Chris O'Haver 1-1/+1
2018-05-11Try to clarify rewrite docs (#1795)Gravatar Chris O'Haver 1-13/+19
2018-05-10Up miekg/dns to 1.0.6 (#1792)Gravatar Miek Gieben 1-1/+1