yarn global add lix
lix download # install haxe libraries
haxe ios.hxml # build ios
haxe android.hxml # build android
cd bin
yarn # install node modules
yarn ios # run ios
yarn android # run androidIn a nutshell:
- Create a new React Native project according to the official documentation
- Create a Haxe project with Coconut (coconut.react-native)
- Replace the "entry point view" with one built with Coconut
Typically, the "entry point view" is registered with
AppRegistry.registerComponent('my-app', () => Main);Since anycoconut.react.Viewis a legitimate react component, so it can be used directly for registration. You can use Haxe's@:exposemetadata to obtain the reference in JS and register there. You can also callregisterComponentin Haxe code directly.