mdx-code
A MDX Deck Layout that renders code blocks on a slide as a Runnable RunKit playground. Only for JavaScript (Node)
Install
yarn add --exact mdx-code
Use
import Code from 'mdx-code';
# Regular Slide
---
export default Code
```javascript A playground slide!
console.log('Hello world');
```Preambles
A slide can have two code blocks. The first code block is run before the second, but the playground only displays the second.
export default Code
```
const x = [1, 2, 3];
```
```javascript x is already defined
x.map(i => i*2);
```Authors
- Pranay Prakash (@pranaygp)

