title: In react-admin get access to redux store
body: <p>My question is related to <a href="https://github.com/marmelab/react-admin" rel="noreferrer">react-admin</a> repo.</p>
  
  <p>I want to dispatch an action, outside of scope of a component, in order to do that, <a href="https://stackoverflow.com/q/50787747/2503644">I've read that</a> I need to get access to the actual redux store itself, and dispatch on in directly,</p>
  
  <p>so I know that the <code>Admin</code> component has an <code>initialState</code> prop, but it only accepts default state object, not the store. So I can't make a store and pass it in.</p>
  
  <p>My question is:</p>
  
  <ul>
  <li>How do I access redux store of an <code>Admin</code> component?</li>
  <li>How can I dispatch an action outside of a component, when using Admin as my main app component?</li>
  </ul>
  
  <p>my current app entry looks like this:</p>
  
  <pre><code>&lt;AppLayoutDirection&gt;
      &lt;Admin
        title="My App"
        locale="en"
        dataProvider={dataProvider}
        authProvider={authProvider}
        i18nProvider={i18nProvider}
        theme={themeProvider}
        customSagas={customSagas}
        appLayout={AppLayout}
      &gt;
        {DynamicResource}
      &lt;/Admin&gt;
    &lt;/AppLayoutDirection&gt;
  </code></pre>