Skip to content

Instantly share code, notes, and snippets.

@cambiata
Last active January 2, 2021 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cambiata/3ee4cd413e9e555db05c5af38476333c to your computer and use it in GitHub Desktop.
Save cambiata/3ee4cd413e9e555db05c5af38476333c to your computer and use it in GitHub Desktop.
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