DEV Community

Cover image for How to Convert a React App to a Mobile app and Persist session cookies using React-Native Webview or a PWA
amlan
amlan

Posted on

7

How to Convert a React App to a Mobile app and Persist session cookies using React-Native Webview or a PWA

In this post I am switching gears from my general cloud technology posts towards a bit of app development. Recently while I was working on one of my side projects, developing a React app, I faced an issue to persist the cookies on the app when opened on mobile. I wanted to convert the React app to an installable android app and provide a persistent login for the user. I didn’t want to develop a whole new app for mobile using React Native and just re-use the React web app which I built, as an app on mobile.

In this post I will be going through the process and steps which I followed to make it work for me. I figured this may help someone having similar issue. These are the parts I will be covering in this post:

Convert the React web app to a mobile app using React-Native and Webview (I will cover an Android app)

  • Handle Cookies from Webview
    Convert the React web app to an installable PWA(Progressive Web Application) via TWA(Trusted Web Activity)

  • Handle cookies in the PWA/TWA

More details can be found on my post here:

https://amlanscloud.com/reactnativepwa/

Image of Quadratic

Free AI chart generator

Upload data, describe your vision, and get Python-powered, AI-generated charts instantly.

Try Quadratic free

Top comments (0)

Jetbrains image

Build Secure, Ship Fast

Discover best practices to secure CI/CD without slowing down your pipeline.

Read more

👋 Kindness is contagious

Dive into this insightful write-up, celebrated within the collaborative DEV Community. Developers at any stage are invited to contribute and elevate our shared skills.

A simple "thank you" can boost someone’s spirits—leave your kudos in the comments!

On DEV, exchanging ideas fuels progress and deepens our connections. If this post helped you, a brief note of thanks goes a long way.

Okay