repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 2.83 kB
JSON
{"ast":null,"code":"\"use strict\";\n\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NavigationContent = ({\n render,\n children\n}) => {\n return render(children);\n};\nexport function useComponent(render) {\n const renderRef = React.useRef(render);\n renderRef.current = render;\n React.useEffect(() => {\n renderRef.current = null;\n });\n return React.useRef(({\n children\n }) => {\n const render = renderRef.current;\n if (render === null) {\n throw new Error('The returned component must be rendered in the same render phase as the hook.');\n }\n return _jsx(NavigationContent, {\n render: render,\n children: children\n });\n }).current;\n}","map":{"version":3,"names":["React","jsx","_jsx","NavigationContent","render","children","useComponent","renderRef","useRef","current","useEffect","Error"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/@react-navigation/core/src/useComponent.tsx"],"sourcesContent":["import * as React from 'react';\n\ntype Render = (children: React.ReactNode) => React.JSX.Element;\n\ntype Props = {\n render: Render;\n children: React.ReactNode;\n};\n\nconst NavigationContent = ({ render, children }: Props) => {\n return render(children);\n};\n\nexport function useComponent(render: Render) {\n const renderRef = React.useRef<Render | null>(render);\n\n // Normally refs shouldn't be mutated in render\n // But we return a component which will be rendered\n // So it's just for immediate consumption\n renderRef.current = render;\n\n React.useEffect(() => {\n renderRef.current = null;\n });\n\n return React.useRef(({ children }: { children: React.ReactNode }) => {\n const render = renderRef.current;\n\n if (render === null) {\n throw new Error(\n 'The returned component must be rendered in the same render phase as the hook.'\n );\n }\n\n return <NavigationContent render={render}>{children}</NavigationContent>;\n }).current;\n}\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS/B,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAgB,CAAC,KAAK;EACzD,OAAOD,MAAM,CAACC,QAAQ,CAAC;AACzB,CAAC;AAED,OAAO,SAASC,YAAYA,CAACF,MAAc,EAAE;EAC3C,MAAMG,SAAS,GAAGP,KAAK,CAACQ,MAAM,CAAgBJ,MAAM,CAAC;EAKrDG,SAAS,CAACE,OAAO,GAAGL,MAAM;EAE1BJ,KAAK,CAACU,SAAS,CAAC,MAAM;IACpBH,SAAS,CAACE,OAAO,GAAG,IAAI;EAC1B,CAAC,CAAC;EAEF,OAAOT,KAAK,CAACQ,MAAM,CAAC,CAAC;IAAEH;EAAwC,CAAC,KAAK;IACnE,MAAMD,MAAM,GAAGG,SAAS,CAACE,OAAO;IAEhC,IAAIL,MAAM,KAAK,IAAI,EAAE;MACnB,MAAM,IAAIO,KAAK,CACb,+EACF,CAAC;IACH;IAEA,OAAOT,IAAA,CAACC,iBAAiB;MAACC,MAAM,EAAEA,MAAO;MAAAC,QAAA,EAAEA;IAAQ,CAAoB,CAAC;EAC1E,CAAC,CAAC,CAACI,OAAO;AACZ","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}