26 lines
No EOL
592 B
JavaScript
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); |