/react-runkit-new

React Runkit component with no external scripts or stylesheets

Primary LanguageJavaScript

react-runkit-new

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

NPM JavaScript Style Guide

Credit

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.

Differences from react-runkit

  • You don't need to load an external script
  • No scrollbar appears when you press 'enter'

Install

npm install --save react-runkit-new

Docs

We maintain the same API as https://github.com/runkitdev/react-runkit

Usage

import React, { Component } from 'react'

import Embed from 'react-runkit-new'

class Example extends Component {
  render () {
    return (
      <Embed source={`var x = 2+2`} />
    )
  }
}

License

MIT © nebrelbug