title: Getting and Passing variables inside React Native from Webview
body: <p>i'm using [react-native-webview][1] in my project React Native. My webview has a javascript array, i need get this Array and show the values inside one menu, like this Slide Menu:
  https://raw.githubusercontent.com/instea/react-native-popup-menu/master/android.demo.gif</p>
  <p>Code:</p>
  <pre><code>function WebViewPage(){
      const html = `
             &lt;html&gt;
             &lt;body&gt;
              &lt;div id=&quot;reportContainer&quot;&gt;here apear the content..&lt;/div&gt;
              &lt;script&gt;
                    var reportContainer = document.getElementById('reportContainer');
                     var pages = [];
                reportContainer.getPages().then(function (reportPages) {
                //HERE RETURN A LIST FROM PAGES FROM MY REPORT..
                pages = reportPages;
                });
            &lt;/script&gt;
            &lt;/body&gt; 
             &lt;/html&gt;
      `
     return(
      &lt;Page&gt;
       &lt;WebView source={{html:html}} /&gt;
     &lt;/Page&gt;
    );
  }
  
  export default WebViewPage;
  </code></pre>
  <p>Basically i need get the pages array and put on Menu at my Header. I was thinking work with hooks, but i don't know how to get this array, any ideas? Thank you.
  [1]: <a href="https://github.com/react-native-community/react-native-webview" rel="nofollow noreferrer">https://github.com/react-native-community/react-native-webview</a></p>