I´m confused with this whole \"no CSS\" thing, but I understand why it\'s beneficial. All I want to do is place a button in the middle of the screen but I don\'t understand how
Update: use built-in Button component.
Deprecated:
Wrap your View into TouchableHighlight for iOS and TouchableNativeFeedback for Android.
var {
Platform,
TouchableHighlight,
TouchableNativeFeedback
} = React;
var tapSpeed = React.createClass({
buttonClicked: function() {
console.log('button clicked');
},
render: function() {
var TouchableElement = TouchableHighlight;
if (Platform.OS === 'android') {
TouchableElement = TouchableNativeFeedback;
}
return (
Tap me as fast as you can!
Button!
);
}
});