title: How to Import a container component from a .js file in react js.to use in other .js file as a popup modals
body: <p>I created a class component(given below) in my local project.
  <strong>AppOne.js</strong></p>
  <pre><code>import React from 'react';
  import { Container, Col, Row, Form } from &quot;react-bootstrap&quot;;
  import './AppOne.scss';
  
  class AppOne extends React.Component {
      constructor(props) {
          super(props);
      }
      render() {
          return (
              &lt;div&gt;
                &lt;Form&gt;
                   .................
                &lt;/Form&gt;
                &lt;Container&gt;
                   &lt;Row&gt;
                      &lt;Col&gt;
                         .......................
                      &lt;/Col&gt;
                   &lt;/Row&gt;
                 &lt;/Container&gt;
              &lt;/div &gt;
          )
      }
  }
  export default AppOne;
  </code></pre>
  <p>And below is my other .js file inside this file I want to import Container Component as a popup model from AppOne.js file</p>
  <p><strong>AppTwo.js</strong></p>
  <pre><code>import React from 'react';
  import { Container, Col, Row, Form } from &quot;react-bootstrap&quot;;
  import AppOne from &quot;./AppOne.Container&quot;
  
  class AppTwo extends React.Component {
      constructor(props) {
          super(props);
      }
      render() {
          return (
              &lt;div&gt;
                &lt;h1&gt;&lt;/h1&gt;
                 &lt;AppOne/&gt;
              &lt;/div&gt;
          )
      }
  }
  export default AppTwo;
  </code></pre>
  <p>I tried to get the solution by using above method. I know this is silly question.  So, What is the best way to solve this?</p>