Reputation: 1876
I don't have any exercise with React Native, so I am considering it as a next technology to learn.
I know that it's a replacement for native Android and iOS apps, but I wonder, in the same time does the application developed with React Native, works as a web application as well?
I found React Native Web, so I wonder: will the same code written in React Native will work on the web, or it will require some additional modifications (if yes how complex are they)?
Upvotes: 2
Views: 7961
Reputation: 71
It looks like this library is already used by big companies like Twitter and Uber, so I would say it does work fairly well.
I could see it as a viable option if you start building your app for Android, iOS and Web. This means you have to test regularly that your additions to your application work on each platform and find workarounds if and when something doesn't work out of the box. Migrating an existing React Native project to include React Native Web would probably not be that straightforward.
With React Native you can build your app with one codebase, but it doesn't mean that you don't have to write platform specific code in some cases.
Flutter also enables developing apps for these platforms in addition to Linux, macOS and Windows. Flutter web apps are still in an early phase so it might not be as stable as React Native Web. I think that currently React Native Web is a better choice if you only want Android, iOS and Web applications from the same codebase.
Upvotes: 1
Reputation: 4068
Not everything written for mobile in React-Native would work in web mode. It's not just because React Native Web is newer, but also because Web APIs are not equivalent to iOS/Android APIs - some features are simply not there for usage. Here is the compatibility list of React Native Web, in the official website.
The lack of supports for both Web and mobile together also needs to be considered here. Take react-native-maps for example: it's written on top of Google Map SDKs for Android and iOS, and MapKit in iOS. It's entirely dependent on the mobile ecosystem, so if you want your map feature to work in Web, you have to implement separate solution for Web only.
Overall, you need to know for each of your project requirements whether the related feature/library is supported in both web and mobile, and if there is not, do you have enough time and resource to implement the missing piece. If the answer is no, then you should separate your code base to handle web and mobile instead.
Upvotes: 5
Reputation: 4252
As a developer, you should always believe that nothing is impossible whether it is coding or assigning the whole project by own. According to the market, React-Native-Web is the most demanding and upgraded version of React and React Native. Yes, it's difficult to find complex things in react native web as compared to the simple web because of fewer backers.
Upvotes: 0