reactgonative

Introduction: Tool to auto generate reactnative to gomobile bindings. Currently just Android in place but iOS to follow
More: Author   ReportBugs   
Tags:

Build Status Code Climate Issue Count Code Coverage Go Report Card GoDoc

Github Releases

Current Status

Currently in pre-alpha. Code currently successfully generates Android bindings.

Roadmap

  1. Add tests to Android elements
  2. Create iOS integration

Context

This tool is born out of experimentation with creating a single development platform that allows one set of code to run across both Android and iOS platforms. (In principle this could be extended to Desktop but not considered at present)

The Go language, through GoMobile along with react-native have created two methods to enable mobile development on a shared codebase. This tool aims to allow externalising any business logic to a common Go component, with the React components handling pure UI.

Communication between React and Go are via the use of Promises. The generated code is not packaged but instead placed within your code folders. They can be edited as required.

Constraints

  1. One return type (of simple type i.e. String, int) from Go method. Plans to introduce mapping to allow multiple returns, and object returns.
  2. Tool does not check if generated code already exists, nor if the call is run from the wrong location.
  3. At present relies on GOPATH being set, and you GO package being present in the GOPATH

Usage

To install:

$ go get -u go get github.com/steve-winter/reactgonative

To use:

$ cd $MYANDROIDFOLDER
$ reactgonative $MYGOPACKAGE
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools