I am using React Native (version 0.46) to develop an app which does a few fetches data from a few resources, renders it and stores the data for display when internet connection is unavailable.
My question: I'm trying to see if its better to apply the "new" plan mentioned below instead of the current. Since RN is using JavaScript Core, is it running the code in a non blocking way like Node.js? advice is appreciated.
Current:
1. The app loads.
2. Check for internet connection (Asynchronously ofcourse).
3. If there is a connection: First, render cached data(if it exists), and second fetch for new data. If there is internet connection but no cached data, just fetch new data.
4. If there is no internet connection, fetch new data, render and store it.
New: Rather than waiting for internet availability, im simply going to render the cached data if available. Would this be a better approach? or is there a better one ?