Skip to content

sskyy/bisheng-plugin-react

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bisheng-plugin-react

npm package NPM downloads Dependency Status

To convert JSX which is written in Markdown to React.Element.

Usage

Install:

npm i --save bisheng-plugin-react

Add 'bisheng-plugin-react to bisehng.config.js's plugins.

module.exports = {
  plugins: ['bisheng-plugin-react?lang=jsx'],
};

In Markdown:

...

This is a button:

```jsx
import { Button } from 'antd';
ReactDOM.render(<Button>Click!</Button>, mountNode);
```
...

The above example will be rendered as:

screenshot

API

lang: String

default: 'react-component'

noreact: Boolean

default: false

Whether to import React and ReactDOM automatically.

License

MIT

About

To convert JSX which is written in Markdown to React.Element.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%