Skip to content

Instantly share code, notes, and snippets.

@jordanell
Created May 28, 2020 16:54
Show Gist options
  • Save jordanell/f646108140645edda3214391ed84d8ad to your computer and use it in GitHub Desktop.
Save jordanell/f646108140645edda3214391ed84d8ad to your computer and use it in GitHub Desktop.
React to Markdown sandbox component
import PropTypes from "prop-types";
import React from "react";
class Sandbox extends React.Component {
static propTypes = {
component: PropTypes.func.isRequired
};
render() {
const { component: Component } = this.props;
return (
<React.Fragment>
<Component />
</React.Fragment>
);
}
}
export default Sandbox;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment