Skip to content

Repository files navigation

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-next
  2. haxelib install react-native
Setup React Native

Follow the steps here

Write some Haxe

Main.hx

package;
importreact.ReactComponent;
importreact.ReactMacro.jsx;
importreact.native.api.*;
importreact.native.component.*;
classMain
{
publicstaticfunctionmain()
{
varprojectName='AwesomeProject';
AppRegistry.registerComponent(projectName, function() returnApp);
}
}
classAppextendsReactComponent
{
overridefunctionrender()
{
returnjsx(' <View> <Text> Test </Text> </View>');
}
}
Build

build.hxml

-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

About

React Native externs for Haxe

Resources

Stars

62 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages