25 lines
581 B
JavaScript
25 lines
581 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() {
|
|
return (
|
|
<div className="app">
|
|
{this.state.isMounted && !window.devToolsExtension && process.env.NODE_ENV === 'development' && <DevTools />}
|
|
{this.props.children}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default connect()(App);
|