title: how to implement the new react-redux v6.0.0
body: <p>i was trying to migrate <code>react-redux</code> <code>v5.X.X</code> to <code>v6.0.0</code> and there dosent seem to be any documentation for it. 
  i am using following versions : 
  <code>"react": "^16.4.2"</code>
  <code>"redux": "^4.0.0"</code>
  <code>"react-redux": "^6.0.0"</code></p>
  
  <p>the official change log says. </p>
  
  <blockquote>
    <p>Passing store as a prop to a connected component is no longer supported. Instead, you may pass a custom context={MyContext} prop to both  and . You may also pass {context : MyContext} as an option to connect.
    link is <a href="https://github.com/reduxjs/react-redux/releases" rel="nofollow noreferrer">here</a></p>
  </blockquote>
  
  <p>here is my root <code>index.jsx</code></p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { configureStore, history } from './Store';
  import App from './App.hot';
  
  import 'antd/dist/antd.min.css';
  const reduxStore = configureStore();
  ReactDOM.render(&lt;App store={reduxStore} history={history} /&gt;, document.getElementById('root'));
  </code></pre>
  
  <p>here is my <code>app.jsx</code> (root component)</p>
  
  <pre><code>import React from 'react';
  import PropTypes from 'prop-types';
  import { Provider, connect } from 'react-redux';
  import { bindActionCreators } from 'redux';
  import { ConnectedRouter } from 'connected-react-router';
  import Layout from './Layout';
  
  class App extends React.Component {
    static propTypes = {
      store: PropTypes.object.isRequired,
      history: PropTypes.object.isRequired,
    };
  
    render() {
      const { store, profile, history } = this.props;
      return (
        &lt;main className="app-wrapper"&gt;
          // what i understand from change log is this part 
          // i need to pass context instead of store as props. 
          &lt;Provider store={store}&gt;
            &lt;ConnectedRouter history={history}&gt;
              &lt;Layout user={profile} /&gt;
            &lt;/ConnectedRouter&gt;
          &lt;/Provider&gt;
        &lt;/main&gt;
      );
    }
  }
  
  
  function mapStateToProps(store) {
    return {
      ...
    };
  }
  function mapDispatchToProps(dispatch) {
    return bindActionCreators({
      ...
    }, dispatch);
  }
  export default connect(mapStateToProps, mapDispatchToProps)(App);
  </code></pre>
  
  <p>as per change log i created <code>context</code> and passed it down to the provider</p>
  
  <pre><code> const storeContext = React.createContext(reduxStore);
  </code></pre>
  
  <p>here is my <code>render</code> function after that change </p>
  
  <pre><code>  render() {
      const { store, profile, history } = this.props;
      return (
        &lt;main className="app-wrapper"&gt;
          &lt;Provider context={storeContext}&gt;
            &lt;ConnectedRouter history={history}&gt;
              &lt;Layout user={profile} /&gt;
            &lt;/ConnectedRouter&gt;
          &lt;/Provider&gt;
        &lt;/main&gt;
      );
    }
  </code></pre>
  
  <p>passing <code>store</code> as <code>props</code> to <code>provider</code> gives following error </p>
  
  <blockquote>
    <p>Passing redux store in props has been removed and does not do anything. To use a custom Redux store for specific components,  create a custom React context with React.createContext(), and pass the context object to React-Redux's Provider and specific components like:  . You may also pass a {context : MyContext} option to connect</p>
  </blockquote>
  
  <p>and passing as <code>context</code> gives following error</p>
  
  <blockquote>
    <p>Could not find "store" in the context of "Connect(App)". Either wrap the root component in a , or pass a custom React context provider to  and the corresponding React context consumer to Connect(App) in connect options.</p>
  </blockquote>
  
  <p>i did not find any documentation expect this redux history document <a href="https://blog.isquaredsoftware.com/2018/11/react-redux-history-implementation/" rel="nofollow noreferrer">here</a> it tells all the problems and solutions for the problem in react-redux and how the context api fixed it. but i am not sure how to actually implement it in real project. </p>
  
  <p>did anyone face the same issue ? or can you please tell me how exactly to implement this change. </p>
  
  <p>thanks </p>