Embedding React or React Native to an existing mobile app - android

I have been doing research about usability scenarios of React and React Native to ultimately decide whether it is a feasible and responsible decision to embed React (or React Native) to an existing mobile app.
So far, what I have learned is that it is possible to render React Native code within a custom view in both Android and iOS. Embedding React is simpler, since a React app is literally a web page that loads the client side framework.
My concerns are many and may also be pointless if I misinterpreted some scenarios. Below are the ones for which my Google skills failed me to get some answers.
Is it possible to use a third party's React component in a React Native rendering view?
What do I lose in terms of backward compatibility and UI performance to fully utilize React Native in mobile? Do low-end devices handle it well?
Is debugging React and React Native a pain? This question may and should be responded subjectively.
When I use React Native, is it possible to push updates to my app's that specific part without publishing an update to Google Play or Apple App Store?
Is React or React Native incompatible with CoffeeScript on the server side? If so, can I avoid that with a custom build flow to ultimately end up with only Javascript files which contain all the server code?
Sorry for the long entry.
Thank you

I worked for react native for several months,and here is my answer:
Is it possible to use a third party's React component in a React Native rendering view?
No,react component for Browser cannot use for mobile.but there are many mobile specific component.You can find here:React.parts
What do I lose in terms of backward compatibility and UI performance to fully utilize React Native in mobile? Do low-end devices handle it well?
You can test these apps on low-end devices to see whether react native can meet your need.
Is debugging React and React Native a pain? This question may and should be responded subjectively.
No,debug React Native code is really easy and efficient.
When I use React Native, is it possible to push updates to my app's that specific part without publishing an update to Google Play or Apple App Store?
Yes,you can do these things easily with Code Push.
Is React or React Native incompatible with CoffeeScript on the server side? If so, can I avoid that with a custom build flow to ultimately end up with only Javascript files which contain all the server code?
There isn't server side code in React Native,all your js code is in a single js file called bundle.js. the compile process is automatic with packager.sh witch provided from React Native,check this link.

Related

integrating react native app in my kmm project

i read multiple articles talking about being able to somehow embed a react native application into a ios / android native application. However it is always the other way around, which means that it's describing how to have native modules inside the react native application. In this case i wanted to embed Rocket.Chat into my kotlin multiplatform mobile project which i have been building for quite some time now but if i understand it correctly, i would have to make my project part of the rocket.chat application. Is there an option / instruction where i could not do it this way and simply embed the chat into my project?
i was expecting to embed rocket.chat, which is a react native mobile application, into my KMM project to use it as a chat. However i find no option to call / start rocket.chat (which can also be whitelabeled).
It is possible to embed a React Native app into a native iOS or Android app, but it is not a straightforward process. One approach would be to use a "WebView" component in your native app, which allows you to load and display web content within your app.
You can use the WebView as a container for your Rocket.Chat React Native app. This way, you can load the Rocket.Chat app in the WebView, and it will appear as if it's part of your native app.
You may also use the react-native-webview package to load the Rocket.Chat app in the WebView.
Keep in mind that this approach may have some limitations, such as the Rocket.Chat app not having full access to the native features of the device, and the performance may not be optimal.

What is the purpose of bridging Kotlin and React Native?

So, as ýou may assume I want to build an android app. I was contemplating whether to use Kotlin or React Native code, then I saw you can make a bridge with Kotlin and RN. What is the purpose of doing that if simply making a Kotlin/RN app easier to set up?
You will possibly get a few reasons. But a summary of it is the fact that React Native may not have all the functionality you may require to build a certain type of app.
For example, you may want an app that scans the network for a specific SSID or maybe create your own network configuration profile - within React Native, that may be impossible as of now.
But by building a bridge with native code, you can create this functionality natively, and by having a bridge - you can invoke those functions via React Native.
There may be some features that are not implemented yet in React
Native or some device-specific features that are not supported by this
development platform. So we can use native modules to fill the gap.
Why do we need native modules in React Native apps?
Who can really say! Maybe you want to make platform-specific code or
want to reuse some existing code. For whatever the reason, React
Native allows you to create your own native modules and expose them to
JavaScript. The whole process is described in depth in the Native
Modules Android documentation.
Ref: https://proandroiddev.com/react-native-bridge-with-kotlin-b2afde2f70b

How much do I have to care about phone support?

Coming from web development, I'm used to double-check browser support for everything.
I'm slowly starting to get into app development with react native, and there is one thing I'm unable to find on google:
How are phone/OS-requirements handled in react native?
For example flexbox. Checking out the stylesheet-component from react native, I don't find a word about support on older android/ios-versions:
https://facebook.github.io/react-native/docs/stylesheet
Do I need to worry about components not working on older smartphones (while developing with the newest version of react and react native)?

Types of apps not suitable for react native on Android

I'm exploring using react native for a fairly complex android app. I was wondering what kind of apps are not suitable for react native? Or is the idea that you can do anything in React Native that you could do natively on Android?
To make the decision whether you should use React Native for your app, I would first check whether all the stuff (camera? location? toasts?) is covered by either React Native's own API's or a community created one.
If the answer is no, then you could also create your own, see https://facebook.github.io/react-native/docs/native-modules-android.html#content for isntructions.
Also know that you can build a "combo-app"; where part of the app is ran by React Native while the other part is truly native.

Can Golang mobile be used with React-Native?

I'm considering writing a mobile app using both Go's mobile lib https://godoc.org/golang.org/x/mobile (I know it's experimental, so this is more of a wait and see situation) for a data layer and a polyfill for the android view and use React-native http://facebook.github.io/react-native/ for the iOS view and hopefully the android view once that is supported (if it is/will be supported).
How much conflict would I have in doing this, if any? I assume I could pass data between the two libraries from each respective native (as in obj-c and java, I know this all compiles to a native app) languages.
To Clarify
Go's mobile lib and react-native would both be compiled into the mobile client. The go lib makes requests to a server and is not the server.
UPDATE
So React Native came out for Android, so now I'm just wondering how go mobile and react native and communicate between each other within the same app executable.
Yes, you can do that. You may include the generated code in your react native project and write some "glue code" (an objective-c and java class) that requires your go library and uses the Native Module extension by React Native to get access to the provided functionality.
I believe that React Native can be used to make mobile apps with any language that can run on the web. Currently I am learning how to make React app with a Golang backend. Later I will build this in React Native and start building other apps with Golang to see how far this goes. There is a course on udemy that teaches golang and react and it isn't that long.

Categories

Resources