title: Cordova with Create-react-app
body: <p>I have created a ReactJs app with <em>create-react-app</em> and then made the Production build with <code>npm run build</code>. In my <em>www</em> folder created with Cordova I just copy all the files from the <em>create-react-app's</em> build folder and that's fine.</p>
  
  <p>I want to know how do I hook into Cordova's events like for example:</p>
  
  <pre><code>function startApp() {
    // your app logic
  }
  if (window.cordova) {
    document.addEventListener('deviceready', startApp, false);
  } else {
    startApp();
  }
  </code></pre>
  
  <p>For example I want to call the minified JS file inside <code>startApp()</code>. Or is there any other workflow that can be used to make Cordova events work with react app.                          </p>
  
  <p>A small example would be helpful.         </p>
  
  <p>Is it possible to use the  build file at all and just use the React App directly inside Cordova? I am unsure how that would work given that there is Webpack settings which transpiles the ES6 code to ES5 and all.</p>
  
  <p>I am new to Cordova and struggling with this integration aspect.</p>