Note: I'm archiving this for now because of a lack of time, and because recent improvements mean React-Runkit works well enough for my use cases
React Runkit component with no external scripts or stylesheets
This package is based off https://github.com/runkitdev/react-runkit. All credit goes to them.
In this project, we also bundle code from https://embed.runkit.com. This means you don't have to load it separately, but it also means our version may not be the latest.
- You don't need to load an external script
- No scrollbar appears when you press 'enter'
npm install --save react-runkit-newWe maintain the same API as https://github.com/runkitdev/react-runkit
import React, { Component } from 'react'
import Embed from 'react-runkit-new'
class Example extends Component {
render () {
return (
<Embed source={`var x = 2+2`} />
)
}
}MIT © nebrelbug