p5.js-web-editor/client/modules/App/App.jsx

26 lines
592 B
React
Raw Normal View History

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