MCPcopy
hub / github.com/kentcdodds/mdx-bundler / getMDXComponent

Function getMDXComponent

src/client/jsx.js:12–15  ·  view source on GitHub ↗

* * @param {string} code - The string of code you got from bundleMDX * @param {Record } jsxGlobals - JSX globals * @param {Record } [globals] - Any variables your MDX needs to have accessible when it runs * @return {(props: MDXContentProps) => JSX.Element}

(code, jsxGlobals, globals)

Source from the content-addressed store, hash-verified

10 * @return {(props: MDXContentProps) => JSX.Element}
11 */
12function getMDXComponent(code, jsxGlobals, globals) {
13 const mdxExport = getMDXExport(code, jsxGlobals, globals)
14 return mdxExport.default
15}
16
17/**
18 * @template {{}} ExportedObject

Callers 4

vue.jsFile · 0.90
preact.jsFile · 0.90
index.jsFile · 0.90
hono.jsFile · 0.90

Calls 1

getMDXExportFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…