Socket
Socket
Sign inDemoInstall

dxm-bisheng-plugin-react

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dxm-bisheng-plugin-react

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


Version published
Maintainers
1
Created
Source

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'

babelConfig: Object

default: { presets: [ 'react', ['env', { targets: { browsers: ['last 2 versions', 'Firefox ESR', '> 1%', 'ie >= 8', 'iOS >= 8', 'Android >= 4'], }, }], ], plugins: [ 'transform-class-properties', 'transform-object-rest-spread', ], }

noreact: Boolean

default: false

Whether to import React and ReactDOM automatically.

License

MIT

Keywords

FAQs

Package last updated on 09 Oct 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc