I have a very specific situation where I have a web app built with React + Vite, that has offline support.
If the user opens the page and the connection fails while saving data, we can save it locally and send it once the connection is re-established.
My problem now is that I need to have a mobile app with this same web app, and we thought about using React Native since the web page was built using React, but instead of rebuilding the app using react native, we want to open the page we have already built.
My problem is how the offline mode would work, I know that if the user has the page open and the connection drops, he will be able to use it, but what if he closes the app and opens it again without an internet connection? We need to cache it.
Previously we had a Xamarin app that would download all the required code and after that everything would be cached so the user could close and open the app again and would able to use it without problems, but Xamarin is now out of support so we're migrating it and as said before we chose React Native.
I want to know if this is possible using React Native, how would we do it? I'm just concerned about trying something we would find out later was not the best approach.
Thank you very much for any thoughts.
It's important to note that it's a business requirement that we build a mobile app, the customer must be able to download it from the Play Store or the App Store, we can't simply tell them to open the browser.
A Guide To Create React Native Offline First Applications : https://www.bacancytechnology.com/blog/react-native-offline-support
Offline first : how to apply this approach in React Native : https://medium.com/@vitorbritto/offline-first-how-to-apply-this-approach-in-react-native-e2ed7af29cde
Creating an offline-first React Native app : https://blog.logrocket.com/creating-offline-first-react-native-app/