p5.js-web-editor/client/modules/App/App.jsx
2016-06-22 18:36:04 -04:00

26 lines
No EOL
592 B
JavaScript

import React from 'react';
import { connect } from 'react-redux';
import DevTools from './components/DevTools';
class App extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {isMounted: false};
}
componentDidMount() {
this.setState({isMounted: true});
}
render() {
debugger;
return (
<div className="app">
{this.state.isMounted && !window.devToolsExtension && process.env.NODE_ENV === 'development' && <DevTools />}
{ this.props.children }
</div>
);
}
}
export default connect()(App);