@mdx-js/react
React implementation for MDX
Last updated a month ago by johno .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mdx-js/react 
SYNC missed versions from official npm registry.

@mdx-js/react

Build Status lerna Join the community on Spectrum

Map components to HTML elements based on the Markdown syntax. Serves as the React implementation for MDX.

Installation

npm:

npm install --save @mdx-js/react

Usage

<!-- helloworld.md -->

# Hello, World!
import React from 'react'
import {MDXProvider} from '@mdx-js/react'
import {renderToString} from 'react-dom/server'

import HelloWorld from './helloworld.md'

const H1 = props => <h1 style={{color: 'tomato'}} {...props} />

console.log(
  renderToString(
    <MDXProvider components={{h1: H1}}>
      <HelloWorld />
    </MDXProvider>
  )
)

Yields:

<h1 style="color:tomato">Hello, world!</h1>

Contribute

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.

License

MIT © Compositor and Vercel

Current Tags

  • 1.5.9-ci.5                                ...           ci (3 months ago)
  • 1.6.6                                ...           latest (a month ago)
  • 2.0.0-next.1                                ...           next (2 months ago)

71 Versions

  • 1.6.6                                ...           a month ago
  • 1.6.5                                ...           2 months ago
  • 2.0.0-next.1                                ...           2 months ago
  • 1.6.4                                ...           2 months ago
  • 2.0.0-next.0                                ...           2 months ago
  • 1.6.3                                ...           2 months ago
  • 1.6.2                                ...           2 months ago
  • 1.6.1                                ...           2 months ago
  • 1.6.0                                ...           3 months ago
  • 1.5.9                                ...           3 months ago
  • 1.5.9-ci.5                                ...           3 months ago
  • 1.5.8                                ...           4 months ago
  • 1.5.8-alpha.0                                ...           5 months ago
  • 1.5.7                                ...           5 months ago
  • 1.5.7-alpha.0                                ...           5 months ago
  • 1.5.6                                ...           5 months ago
  • 1.5.6-alpha.0                                ...           5 months ago
  • 1.5.6-ci.0                                ...           5 months ago
  • 1.5.5                                ...           6 months ago
  • 1.5.4                                ...           6 months ago
  • 1.5.3                                ...           7 months ago
  • 1.5.2                                ...           7 months ago
  • 1.5.1                                ...           9 months ago
  • 1.5.0                                ...           10 months ago
  • 1.4.5                                ...           10 months ago
  • 1.4.4                                ...           10 months ago
  • 1.4.3                                ...           10 months ago
  • 1.4.2                                ...           10 months ago
  • 1.4.1                                ...           10 months ago
  • 1.4.0                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.1-ci.5                                ...           a year ago
  • 1.1.1-ci.1                                ...           a year ago
  • 1.0.27-ci.0                                ...           a year ago
  • 1.0.27                                ...           a year ago
  • 1.0.26                                ...           a year ago
  • 1.0.23                                ...           a year ago
  • 1.0.22                                ...           a year ago
  • 1.0.22-ci.5                                ...           a year ago
  • 1.0.21                                ...           a year ago
  • 1.0.21-ci.7                                ...           a year ago
  • 1.0.20                                ...           a year ago
  • 1.0.20-ci.2                                ...           a year ago
  • 1.0.16                                ...           a year ago
  • 1.0.16-ci.0                                ...           a year ago
  • 1.0.15                                ...           a year ago
  • 1.0.15-ci.0                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0-rc.5                                ...           a year ago
  • 1.0.0-rc.4                                ...           a year ago
  • 1.0.0-ci.0                                ...           a year ago
  • 1.0.0-rc.3                                ...           a year ago
  • 1.0.0-ci.1                                ...           a year ago
  • 1.0.0-rc.2                                ...           a year ago
  • 1.0.0-rc.0                                ...           a year ago
  • 1.0.0-alpha.17                                ...           a year ago
  • 1.0.0-alpha.16                                ...           a year ago
  • 1.0.0-alpha.13                                ...           a year ago
  • 1.0.0-alpha.12                                ...           a year ago
Downloads
Today 40
This Week 1,227
This Month 5,026
Last Day 402
Last Week 2,434
Last Month 8,969
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (769)

Copyright 2014 - 2016 © taobao.org |