import React, { Component } from 'react'; import { connect, ResolveThunks } from 'react-redux'; import { Tabs } from '@redux-devtools/ui'; import { monitors } from '../utils/getMonitor'; import { selectMonitor } from '../actions'; import { StoreState } from '../reducers'; type StateProps = ReturnType; type DispatchProps = ResolveThunks; type Props = StateProps & DispatchProps; class MonitorSelector extends Component { shouldComponentUpdate(nextProps: Props) { return nextProps.selected !== this.props.selected; } render() { return ( ); } } const mapStateToProps = (state: StoreState) => ({ selected: state.monitor.selected, }); const actionCreators = { selectMonitor, }; export default connect(mapStateToProps, actionCreators)(MonitorSelector);