title: How to render a container dynamically in react-redux?
body: <p>I am new to redux-react so excuse me if it is a stupid question.
  I have a page which shows the list of some products in a table.
  When I click on a product, I want to show details about that product in a panel overlaying the main page.</p>
  
  <p>The problem is that the detail page has already a component and container class.
  If I want to render the component I have to mix the main page and detail page containers together which I don't want. I want to keep each page component and container separate.</p>
  
  <p>When I render container I get the error</p>
  
  <blockquote>
    <p>Invariant Violation: Could not find "store" in either the context or props. Either wrap the root component in a , or explicitly pass "store" as a prop.</p>
  </blockquote>
  
  <p>I don't know how to pass it and I googled about it I couldn't find a solution for my case. I don't want to initialize a new store.</p>
  
  <p>Here is my click function to show the detail page.</p>
  
  <pre><code>onClick(){
      ReactDOM.render(
          &lt;div&gt;
              &lt;div className="my-panel" id="my-panel" data-toggler=".is-active"&gt;
                  &lt;ProductDetailContainer /&gt;
                  &lt;button className="button" data-toggle="my-panel"&gt;Close&lt;/button&gt;
             &lt;/div&gt;
          &lt;/div&gt;,
          wrapper
      );
  }
  </code></pre>
  
  <p>here is my product detail container code:</p>
  
  <pre><code>export class ProductDetailContainer extends RootContainer {
  constructor(props) {
      super(props);
      this.state = {
          productDetail: {}
      };
  }
  
  componentDidMount() {
      this.props.dispatch(someAction);
  }
  
  componentWillReceiveProps(nextProps) {
      //some code here
  }
  
  handleRefresh() {
     //some code here
  }
  
  render() {
    return (
          &lt;div className="row small-12 columns"&gt;
              &lt;ProductDetailComponent                    
                  data={this.state.productDetail}              
              /&gt;
          &lt;/div&gt;
      );
  }
  }
  
  ProductDetailContainer.propTypes = {
      productDetail: PropTypes.object
  };
  
  
  export function mapStateToProps(state) {
      return {
          productDetail: state.productdetail
      };
  }
  
  export default connect(mapStateToProps)(ProductDetailContainer);
  </code></pre>