@mdx-js/runtime
Version:
Deprecated: this package is no longer maintained.
24 lines (16 loc) • 508 B
Markdown
Deprecated: this package is no longer maintained.
You can use [`@mdx-js/mdx`](https://mdxjs.com/packages/mdx/#evaluatefile-options)
itself to compile *and* run:
```jsx
import {evaluate} from '@mdx-js/mdx'
import * as runtime from 'react/jsx-runtime'
const components = {
h1: props => <h1 style={{color: 'tomato'}} {...props} />
}
const document = `
`
const {default: Content} = await evaluate(document, runtime)
console.log(<Content components={components} />)
```