title: How to pass parameters from main process to render processes in Electron
body: <p>I have an Electron app that can open different windows.</p>
  
  <p>On app launch the app open a set of window(s) (that load the same HTML and JS files) but with params to change each window displayed infos.</p>
  
  <p>Example :</p>
  
  <pre><code>app.on('ready', async () =&gt; {
    ...
    // open window for stuff 1
    win1 = new BrowserWindow({
       width: 1024,
       height: 728
    });
    win1.loadURL(`file://${__dirname}/app/app.html?id=1`);
  
    // open window for stuff 2
    win2 = new BrowserWindow({
       width: 1024,
       height: 728
    });
    win2.loadURL(`file://${__dirname}/app/app.html?id=2`);
  </code></pre>
  
  <p>Obviously passing params in file:// path doesn't work.
  I can't find a clear solution in Electron documentation or elsewhere on Internet to condition my rendered window to a param.</p>
  
  <p>I can probably use IPC communication after window ready but it seems a little bit too complicated until I just want pass a variable to my child view.</p>
  
  <p>P.S. : to be totally honest my application is built with React/Redux and the param I want to pass to view is the redux store key to listen for this view.</p>