I recently started using React Native to work on an app that involves web scraping. We've been using a ponent called the React Native WebView Bridge, which is similar to the UIWebViewBridge library in Obj-C but has some problems. Since React Native is asynchronous, we've been having trouble returning info in that the App calls the render function with the WebView Bridge often and unpredictably. Sometimes the WebView Bridge module will call our injected javascript 1 time, and sometimes it will call 3 times.
Is there a better way to scrape info and inject javascript effectively in React Native?
Here's a link to the WebViewBridge for React Native that we used.
I recently started using React Native to work on an app that involves web scraping. We've been using a ponent called the React Native WebView Bridge, which is similar to the UIWebViewBridge library in Obj-C but has some problems. Since React Native is asynchronous, we've been having trouble returning info in that the App calls the render function with the WebView Bridge often and unpredictably. Sometimes the WebView Bridge module will call our injected javascript 1 time, and sometimes it will call 3 times.
Is there a better way to scrape info and inject javascript effectively in React Native?
Here's a link to the WebViewBridge for React Native that we used.
Share Improve this question edited Jun 21, 2016 at 0:50 metacore asked Jun 20, 2016 at 22:28 metacoremetacore 911 gold badge1 silver badge9 bronze badges1 Answer
Reset to default 6I've used cheerio to parse HTML content from a website, transform it into JSON and use that to feed a React ponent. This way you get the benefits of using React Native, and not just a hybrid web app.
You can find an example of it in this React Native app: https://github./stan229/ClubReadyApp