— React-Native Programmierer . Patrick Tresp

Archive
react-native

When getting serious in creating apps with react-native, there’s more than just react and some coding.
At some point you will need to digg into XCode and it’s gui, which is a pain in the a$$ i believe.

Thanks to this article: https://medium.com/@kelleyannerose/react-native-ios-splash-screen-in-xcode-bd53b84430ec creating a xcode storyboard file is now an easy thing and the most important functions are explained well.

 

Thanx!

 

Read More

First thing i needed to learn is to write externs.

Not all react-components that are available from scratch are ready-to-use with haxe-react-native (https://github.com/haxe-react/haxe-react-native).

For example to use the Button Component as described here: https://facebook.github.io/react-native/docs/button.html

you will get an Error Message similar to this:
Unknown identifier : Button

To use this Component as wanted, you will need do write an extern as documented here: https://haxe.org/manual/lf-externs.html

If you know what to to, just create a class in a packagename with identical name of the Component, you want to use:

com.packagemname.js.reactnative.Button

With following content:
package com.packagemname.js.reactnative;

@:jsRequire('react-native', 'Button')
extern class Button extends react.ReactComponent {}

Now you are all set to use this component by importing the extern

import de.superclass.js.reactnative.Button;

and use it:
var button = cast jsx(<Button key="unique-key" title="hey" onPress={_onPress}></Button>\');

Read More