import React from "react" import PropTypes from "prop-types" import ObjectInspector from "react-inspector" export default class Debug extends React.Component { constructor() { super() this.state = { jsonDumpOpen: false } this.toggleJsonDump = (e) => { e.preventDefault() this.setState({jsonDumpOpen: !this.state.jsonDumpOpen}) } } plusOrMinus(bool) { return bool ? "-" : "+" } render() { let { getState, getComponent } = this.props window.props = this.props const Collapse = getComponent("Collapse") return (

{this.plusOrMinus(this.state.jsonDumpOpen)} App

) } } Debug.propTypes = { getState: PropTypes.func.isRequired, getComponent: PropTypes.func.isRequired, }