Can I develop pwa using react native

15,305

Solution 1

There is no relation between React Native apps and PWAs.

React Native are native apps written in javascript whereas PWAs are just web apps.

A web app will act as a PWA only if it contains a manifest file and is served on https. You can also use all web features like push notifications, caching etc. See the whole list here - https://whatwebcando.today

Solution 2

You can make React Native application to work similar to PWA if you are focusing datas. There is some options to make easy mobile-server sync application even in offline.

Or you can custom by yourself using AsyncStorage based on Key-Value dictionary.

But the some functions between Web and Mobile App are different especially in storage ways, background process and service worker. Thus, the react libraries related in PWA may not work in React Native because there is no service worker and local storage is different.

Solution 3

You could use react-native-web components to build your React Native app and reuse those same components on the web. There are some limitations but basically react-native-web gives you a set of cross-platform components. You could then use those components on the web side to build a Progressive Web App (PWA). I'd suggest spending some time getting a prototype working to see if it is a viable solution for your use case and so that the limitations become more readily apparent.

Share:
15,305

Related videos on Youtube

albert sh
Author by

albert sh

Updated on June 04, 2022

Comments

  • albert sh
    albert sh almost 2 years

    I have searched a lot for finding the clear answer for this question but unfortunately as I am new to both of these technologies I could not find a clear answer.

    I am going to develop a cross platform mobile app using PWA technology and I know that I can use react but I wonder if can also use react native too as it has been designed for mobile app while react is designed for web app.

    I found this question that describes the differences between react and react native :"React native is an extra library on the top of React, to make native app for iOS and Android devices"

    What is the difference between React Native and React?

    Is there any conflict using react native and PWA?

    Any advice would be appreciated.

  • Nizzy
    Nizzy almost 4 years
    This is absolutely NOT true. You can integrate PWA mobile into React Native app. All you do is to bring all your UI from the mobile web app. Then, you can create your manifest in the web app to make it PWA. Search google with "react native with pwa app"