
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@mdx-js/runtime
Advanced tools
@mdx-js/runtime
Parse and render MDX in a runtime environment.
:warning: warning: this is not the preferred way to use MDX since it introduces a substantial amount of overhead and dramatically increases bundle sizes. It should also not be used with user input that isn’t sandboxed.
npm:
npm i -S @mdx-js/runtime
import React from 'react'
import MDX from '@mdx-js/runtime'
// Provide custom components for markdown elements
const components = {
h1: props => <h1 style={{color: 'tomato'}} {...props} />,
Demo: props => <h1>This is a demo component</h1>
}
// Provide variables that might be referenced by JSX
const scope = {
some: 'value'
}
const mdx = `
# Hello, world!
<Demo />
`
export default () => (
<MDX components={components} scope={scope}>
{mdx}
</MDX>
)
See the Support and Contributing guidelines on the MDX website for ways to (get) help.
This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
MIT © Compositor and Vercel
FAQs
Deprecated: this package is no longer maintained.
The npm package @mdx-js/runtime receives a total of 8,961 weekly downloads. As such, @mdx-js/runtime popularity was classified as popular.
We found that @mdx-js/runtime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.