title: Including two html files for two windows in Electron
body: <p>I want to create a second window through a button click. I tried creating a second window using IPC in main.js and the window does pop up.</p>
  <pre><code>ipcMain.on('video', (e) =&gt; {
    vidWindow = new BrowserWindow({
        height:500,
        width: 500
    });
    vidWindow.loadURL('file://' + __dirname + './../src/Video.html');
    vidWindow.webContents.openDevTools()
    vidWindow.removeMenu();
  });
  </code></pre>
  <p>I thought I can just include a second html file in the public folder, change the id from &quot;root&quot; to something else ('vid' in my case), and add a second <code>ReactDOM.render</code> like so in index.js:</p>
  <pre><code>const mainElement = document.getElementById('root');
  if(mainElement){
    ReactDOM.render(
      &lt;BrowserRouter&gt;
        &lt;div&gt;
          &lt;Route exact path='/'&gt;&lt;Redirect to='/login'/&gt;&lt;/Route&gt;
          &lt;Route path='/login'&gt;&lt;Login /&gt;&lt;/Route&gt;
          &lt;Route path='/home'&gt;&lt;App /&gt;&lt;/Route&gt;
        &lt;/div&gt;
      &lt;/BrowserRouter&gt;,
      mainElement
    );
  }
  
  const vidElement = document.getElementById('vid');
  if(vidElement){
    ReactDOM.render(
      &lt;VideoPage/&gt;,
      vidElement
    );
  }
  </code></pre>
  <p>However, the VideoPage element is not rendered, so I think there must be some misunderstanding on my part about how the Electron rendering process works. I've been stuck on this for days and still can't find a solution to this, unfortunately. Is this the right approach to try to run two windows at the same time?</p>