title: Changing state/props of root component with Redux?
body: <p>I have my root component that renders something like this:</p>
  
  <pre><code>&lt;Provider store={store}&gt;
    &lt;IntlProvider locale="en" messages={this.state.messages}&gt;
      &lt;Router&gt;
        &lt;App&gt;
          // routes
        &lt;/App&gt;
      &lt;/Router&gt;
    &lt;/IntlProvider&gt;
  &lt;/Provider&gt;
  </code></pre>
  
  <p>I'm getting <code>this.state.messages</code> dynamically (async, Redux action + reducer) from the back-end as an object. I'm storing it in Redux store. How do I pass the Redux store <code>messages</code> to <code>this.state.messages</code> (<code>props</code> would do as well).</p>
  
  <p>Plot twist: I CAN'T USE react-redux <code>connect</code> with this component, because it's the root component and it's not within <code>&lt;Provider&gt;</code> (it introduces it), so, doing this:</p>
  
  <pre><code>const mapStateToProps = state =&gt; {
    return {
      messages: state.messages
    }
  }
  
  export default connect(mapStateToProps)(RootComponent);
  </code></pre>
  
  <p>Ends in:</p>
  
  <pre><code>Uncaught Error: Could not find "store" in either the context or props of "Connect(RootComponent)". Either wrap the root component in a &lt;Provider&gt;, or explicitly pass "store" as a prop to "Connect(RootComponent)".
  </code></pre>
  
  <p>Is there a way of accessing Redux store in a different, sane manner? I was thinking about store.getState() but it accepts no arguments and mapping over all the state items seems like an overkill when I want to get just one of them. Or maybe I do something wrong and after all <code>connect</code> should work here?</p>