Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 979
Christian Grabowski Avatar asked Sep 08 '15 16:09

Christian Grabowski


People also ask

Can React Native be used for mobile?

React Native is an open-source mobile application framework used to develop apps for Android, Apple, and Windows platforms; and for the web. Develop native apps for Android and iOS using React and JavaScript to create a single codebase that can be shared across platforms.

Can you make mobile apps with Golang?

There are a variety of languages available to build the functionality of mobile applications, but Golang is among the most popular programming languages in the field of mobile application development.

Can React Native be used for web and mobile?

Can React Native be used for web and mobile? Yes! With React Native for Web, developers can write a single React Native application that can run natively on Android and iOS, as well as on a web browser using standard web technologies.

Is Facebook mobile written in React Native?

Originally, Facebook only developed React Native to support iOS. However, with it's recent support of the Android operating system, the library can now provide mobile UIs for both platforms. Facebook used React Native to develop its own Ads Manager app, creating both an iOS and an Android version.


Video Answer


1 Answers

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.

like image 171
Daniel Schmidt Avatar answered Oct 02 '22 02:10

Daniel Schmidt