title: React-redux component is not re-rendering after state change
body: <p>One of my react-redux components is not re-rendering after state change. I want the select to become enabled after the checkbox is checked. But that doesn't happen. Only if I click somewhere else on the page on another component that triggers re-rendering, everything becomes as I expected. What am I doing wrong? I would be grateful for any help.</p>
  <pre class="lang-js prettyprint-override"><code>class Select extends React.Component {
      constructor(props) {
          super(props);
      }
  
  render() {
      return (
          &lt;div&gt;
              &lt;input type=&quot;checkbox&quot; onClick={this.props.toggleSelect}/&gt;
              &lt;select disabled={ !Object.keys(this.props.syncObjects).includes(&quot;select&quot;) }&gt;
              // some options 
              &lt;/select&gt;
          &lt;/div&gt;
      )
  }
  }
  
  const mapDispatchToProps = {
      toggleSelect
  }
  
  const mapStateToProps = state =&gt; {
      return {
          syncObjects: state.json.objects
      }
  }
  
  export default connect(mapStateToProps, mapDispatchToProps)(Select);
  
  // reducer file
  const initialState = {
      objects: {}
  }
  
  export const myReducer = (state = initialState, action) =&gt; {
      switch (action.type) {
          case TOGGLE_SELECT:
              if (Object.keys(state.objects).includes(&quot;select&quot;)){
                  const new_state = {...state}
                  delete new_state.objects[&quot;select&quot;]
                  return new_state
              }
              else {
                  return {
                      ...state,
                      objects: {
                          ...state.objects,
                          'select': ''
                      }
                  }
              }
  
          default:
              return state
      }
  }
  
  // actions.js
  export function toggleSelect() {
      return {
          type: TOGGLE_SELECT
      }
  }
  </code></pre>