npm install react-runkitRunKit Embed Component.
Install the package:
``sh`
$ npm i -S react-runkit
Add the RunKit embed library to your page:
`html`
...
...
`js
const React = require('react')
const Embed = require('react-runkit')
const helloSource = console.log('Hello, world!')
module.exports = class HelloEmbed extends React.Component {
render() {
return
}
}
`

Don't forget to check out the RunKit embed docs.
Specify the source code that the notebook will use.
`js
If true, the user will not be able to edit or run the embed.
`js
If 'endpoint', the notebook will be run as an endpoint and a link to the served page will be shown.
`js
Request a version or semver range for the node engine.
`js
Provide a list of environment variables accessible in the notebook through process.env.
`js
Provide a title for the notebook when opened on RunKit.
`js
Provide a minimum height for the embed ('130px' by default).
`js
Specify the Unix time in milliseconds at which packages should resolved. Packages published after the date will be ignored.
`js
Specify source code that is run before the main source. This code will not be shown in the embed.
`js
Provide a callback that is run when the embed is loaded.
`js
Provide a callback that is run whenever the embed's URL changes.
`js
Provide a callback that is run whenever the embed is evaluated.
`js
Evaluate the notebook.
Retrieve the URL of the notebook.
`js
class App extends React.Component {
run() {
this.refs.embed.evaluate()
}
render() {
return (