Last active
January 2, 2021 13:31
-
-
Save cambiata/3ee4cd413e9e555db05c5af38476333c to your computer and use it in GitHub Desktop.
Source files accompanying the "Get going with Haxe and React Native" video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Source files accompanying the "Get going with Haxe and React Native" video: | |
https://www.youtube.com/watch?v=e8gqN0PDJos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-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