Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 30, 2024 via pnpm

@mdx-js/react 2.3.0

React context for MDX
Package summary
Share
0
issues
1
license
8
MIT
Package created
28 Mar 2019
Version published
9 Feb 2023
Maintainers
4
Total deps
8
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
8 Packages, Including:
@mdx-js/react@2.3.0
@types/mdx@2.0.12
@types/prop-types@15.7.12
@types/react@18.2.73
csstype@3.1.3
js-tokens@4.0.0
loose-envify@1.4.0
react@18.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of @mdx-js/react 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@types/mdx2.0.129.56 kBMIT
prod
@types/react18.2.73420.91 kBMIT
prod
react18.2.079.25 kBMIT
prod peer

Visualizations

Frequently Asked Questions

What does @mdx-js/react do?

The @mdx-js/react is a context-based components provider that combines React with MDX. MDX is a format that lets you seamlessly use JSX within your markdown documents. With @mdx-js/react, you can use components from the MDX context in your React applications. This package does not provide a default export, but exports several identifiers including MDXContext, MDXProvider, useMDXComponents, and withMDXComponents.

How do you use @mdx-js/react?

@mdx-js/react is used in conjunction with an MDX compiler to integrate MDX-compiled JavaScript components into a React application. Here is an example of usage:

import {MDXProvider} from '@mdx-js/react'
import Post from './post.mdx'
// The MDX file is assumed to be compiled using an integration like @mdx-js/esbuild, @mdx-js/loader, @mdx-js/node-loader, or @mdx-js/rollup.
// The compiler must do be configured with options.providerImportSource set to '@mdx-js/react'.

const components = {
  em: props => <i {...props} />
}

<MDXProvider components={components}>
  <Post />
</MDXProvider>

You can also pass components directly:

import Post from './post.mdx'

const components = {
  em: props => <i {...props} />
}

<Post components={components} />

Where are the @mdx-js/react docs?

The @mdx-js/react package documentation is available within the package's readme content on GitHub here. This information covers essential technical aspects like the API exports, usage examples, type integration, and more.