Skip to content

Releases: mdx-js/mdx

Hoist statics

22 Jul 17:43
Compare
Choose a tag to compare

MDXTag now hoists non-React statics of Layout components. This is useful for usage with getInitialProps.

Parcel plugin, runtime package and improved React context support

12 Jul 13:11
Compare
Choose a tag to compare

Improve React 16 support

06 Jul 14:59
Compare
Choose a tag to compare
Pre-release

Uses create-react-context to ponyfill React's context API to ensure support for all React 16 versions.

Add support for components as properties

06 Jul 14:56
Compare
Choose a tag to compare

Components like Foo.Bar weren't parsed as JSX if they started the JSX block. They are now properly parsed.

Implement runtime using buble

06 Jul 14:58
Compare
Choose a tag to compare
Pre-release
npm install --save @mdx-js/runtime

Parses and renders MDX in a runtime environment

⚠️ 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 only be used with sandboxed user input.

Add footnote support

06 Jul 14:56
Compare
Choose a tag to compare
v0.12.0

v0.12.0

MDX Provider

14 Jun 15:43
Compare
Choose a tag to compare

If you're using an app layout that wraps your JSX, you can use the MDXProvider to only pass your components in one place:

import React from 'react'
import { MDXProvider } from '@mdx-js/tag'

import * as components from './markdown-components'

export default props =>
  <MDXProvider components={components}>
    <main {...props} />
  </MDXProvider>

Layout support via export default

08 Jun 15:42
Compare
Choose a tag to compare

You can now export a component as the default and it will wrap the output JSX. This is great when your MDX file is the entrypoint like a standalone page.

import MyLayout from '../somewhere'

# hello world 

some text

export default (props) => <MyLayout {...props} title="test" />