Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/christophehurpeau/babel-plugin-jsx-code

Replace `<Code>` content to render code side by side with source string
https://github.com/christophehurpeau/babel-plugin-jsx-code

babel-plugin jsx

Last synced: 2 months ago
JSON representation

Replace `<Code>` content to render code side by side with source string

Awesome Lists containing this project

README

        


babel-plugin-jsx-code


Replace `<Code>` content to render code side by side with source string







## Usage

```jsx
import Code from 'babel-plugin-jsx-code/Component';

const RenderCode = ({ source, result }) => (


{source}


{result}


);

export default () => (


A list:




  • Green

  • Red




)
```

Render to:

```html


A list:





<ul>
<li>Green</li>
<li>Red</li>
</ul>




  • Green

  • Red





```