Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Porting a full blown react web app to react native

I have a full blown mobile web app using the following:

  1. React
  2. Redux
  3. Redux-React
  4. React Router
  5. Firebase

I eventually want to convert this mobile web app to a mobile app and I am looking into using React Native. There is a lot of literature on how to build React Native apps from scratch or to convert a native app in Objective-C to react native but I am struggling a bit to find some prior-art of how to approach taking a mobile web app towards native.

More specifically, what are the things that wont work out of the box? I am looking at React-Router.

Some thoughts around how to start transitioning, what to touch and what to not worry would be very helpful.

UPDATE:

Imagine the following app structure. Its already a lot of code. So, I am wondering if there are approaches to do this incrementally?

enter image description here

like image 331
Rajat Avatar asked Sep 30 '16 22:09

Rajat


People also ask

Can I convert a React app to react native?

Convert React to React NativeIt's certainly possible to take React applications and replicate their functionality and looks of UI. However, it's not possible to copy the code directly. React Native has a different architecture, and developers must follow these instructions when creating UI components.

Can we convert React website to App?

React Native is a JavaScript framework that allows you to create real-time, natively rendered mobile apps for iOS and Android platforms.


1 Answers

Many folks are porting their React applications to React Native incrementally by using Web View as an initial 'foot in the door', and then using React Native views on a flow-by-flow basis. With the recent availability of react-native-webview-bridge ( https://github.com/alinz/react-native-webview-bridge ), two-way communication between those web views and the react native components is now very easy.

There can be performance issues when using Web Views on iOS versus the regular Safari app, so that may force certain UI flows to be converted to React Native before you can ship.

I'd highly recommend translating any Selenium tests to Appium to keep your automated test coverage up. React Native is still a bit volatile, and being able to upgrade quickly and safely will be highly dependent on having an automated test suite.

like image 141
Matt Hargett Avatar answered Sep 22 '22 20:09

Matt Hargett