Giorgio Mandolini
ActivityIndicatorIOS
DatePickerIOS
Image
ListView
MapView
Navigator
Modal
NavigatorIOS
PickerIOS
ProgressViewIOS
ScrollView
SegmentedControlIOS
SliderIOS
SwitchIOS
TabBarIOS
TabBarIOS.Item
Text
TextInput
TouchableHighlight
TouchableOpacity
TouchableWithoutFeedback
View
WebView
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var { AppRegistry, StyleSheet, Text, View } = React;
var ReactNight = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Night!
</Text>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
}
});
AppRegistry.registerComponent('ReactNight', () => ReactNight);
render() {
return (
<View>
<Text style={styles.title}>
React Native Todo-List
</Text>
<Form/>
<List/>
</View>
);
}
learn once - write everywhere
like the web
<View>
<Text>
<TextInput>
<Image>
<div>
<span>
<input>
<img>
render() {
return (
<View style={styles.row}>
<TextInput
placeholder="Add a ToDo..."
style={styles.input}
value={this.state.todoText}/>
<TouchableHighlight
style={styles.button}>
<Text style={{textAlign:'center'}}>Save</Text>
</TouchableHighlight>
</View>
);
}
<TextInput style={styles.input} />
var styles = StyleSheet.create({
row: {
flexDirection: 'row',
},
input:{
flex:9,
borderWidth:1,
borderColor:'black',
margin:10
},
button:{
flex:3,
borderWidth:1,
borderColor:'black',
margin:10
}
});
https://github.com/facebook/css-layout
Native
Webview (Cordova, ionic ...)
Compiling to native (xamarin ...)
JS Bridge (Ti, NTS, React Native)
Javascript
Native
You can use all your native code you want but...
remember it!
Layout needs measures, asynch doesn't help
Transpiled to Native
http://www.reactnativeandroid.com/