Created
January 12, 2016 06:33
-
-
Save andrewvmail/65e818b2d886bf319b99 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
var React = require('react-native'); | |
var { | |
StyleSheet, | |
Text, | |
View, | |
TouchableWithoutFeedback, | |
} = React; | |
var styles = React.StyleSheet.create({ | |
container: { | |
flex: 1 | |
} | |
}); | |
var FBLogin = require('react-native-facebook-login'); | |
var Login = React.createClass({ | |
_onClick: function() { | |
console.log('MOMO TERRAW!!!!!!'); | |
this.props.navigator.push({ | |
title: 'Results', | |
component: SearchPage | |
}); | |
//this.props.onClick(this.props.data); | |
}, | |
render: function() { | |
return ( | |
<TouchableWithoutFeedback onPress={this._onClick} > | |
<FBLogin/> | |
</TouchableWithoutFeedback> | |
); | |
} | |
}); | |
var SearchPage = require('./SearchPage'); | |
// | |
// | |
class l2e extends React.Component { | |
render() { | |
return ( | |
<View style={{flexDirection: 'row', height: 100, padding: 20}}> | |
<Text>Hello world</Text> | |
<View style={{backgroundColor: 'blue', flex: 0.3}} /> | |
<View style={{backgroundColor: 'red', flex: 0.5}} /> | |
<Login/> | |
</View> | |
//<React.Navigator | |
// initialRoute={{name: 'My First Scene', index: 0}} | |
// renderScene={(route, navigator) => | |
// <Login | |
// name={route.name} | |
// onForward={() => { | |
// var nextIndex = route.index + 1; | |
// navigator.push({ | |
// name: 'Scene ' + nextIndex, | |
// index: nextIndex, | |
// }); | |
// }} | |
// onBack={() => { | |
// if (route.index > 0) { | |
// navigator.pop(); | |
// } | |
// }} | |
// /> | |
// } | |
///> | |
); | |
} | |
} | |
// | |
//class HelloWorld extends React.Component { | |
// render() { | |
// return <React.Text style={styles.text}>Hello World (Again)</React.Text>; | |
// } | |
//} | |
// | |
React.AppRegistry.registerComponent('l2e', | |
function() { return l2e }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment