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