React Native externs for Haxe
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
haxe_libraries Type stuff in StyleSheet.create() Apr 19, 2018
src Add missing DeviceEventEmitter api Dec 18, 2018
tests Type stuff in StyleSheet.create() Apr 19, 2018
.gitignore Type stuff in StyleSheet.create() Apr 19, 2018
.haxerc Type stuff in StyleSheet.create() Apr 19, 2018
.travis.yml Initial commit Nov 1, 2016
README.md Fix numbering Mar 31, 2017
haxelib.json Specify dependency location Oct 2, 2018
submit.sh Release 0.1.0 Jan 5, 2017
tests.hxml Initial commit Nov 1, 2016

README.md

haxe-react-native

Quick Start

Follow the steps here to start writing an app in less than a minute!

Manual Setup

Install Haxelibs
  1. haxelib install react
  2. haxelib install react-native
Setup React Native

Follow the steps here

Write some Haxe

Main.hx

package;

import react.ReactComponent;
import react.ReactMacro.jsx;
import react.native.api.*;
import react.native.component.*;

class Main
{
    public static function main()
    {
        var projectName = 'AwesomeProject';
        AppRegistry.registerComponent(projectName, function() return App);
    }
}

class App extends ReactComponent
{
    override function render()
    {
        return jsx('
            <View>
                <Text>
                    Test
                </Text>
            </View>
        ');
    }
}
Build

build.hxml

-lib react
-lib react-native

-cp src
-main Main
-js index.ios.js

Then the generated index.ios.js can be used in the usual react-native workflow