Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Source files accompanying the "Get going with Haxe and React Native" video
Source files accompanying the "Get going with Haxe and React Native" video:
https://www.youtube.com/watch?v=e8gqN0PDJos
import react.ReactComponent;
import react.ReactMacro.jsx;
import react.native.component.*;
import react.native.api.*;
@:expose('App')
class App extends react.ReactComponent {
override function render() {
return jsx('
<View style=${styles.view}>
<Text style=${styles.text} >Welcome to Haxe and React Native!</Text>
<Image style=${styles.image} children=${null} source=${{uri: "https://haxe.org/img/haxe-logo.png"}} ></Image>
</View>
');
}
public static var styles = StyleSheet.create({
view: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#343442',
},
text: {
fontSize: 20,
textAlign: 'center',
margin: 10,
color: 'white',
},
image: {
width: 120,
height: 120
}
});
}
-dce full
-D analyzer-optimize
-p src
-L react
-L react-native
App
-D js-es=6
-js bin/App.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment