Skip to content

Instantly share code, notes, and snippets.

@alaingoldman
Last active August 11, 2017 22:42
Show Gist options
  • Select an option

  • Save alaingoldman/ab0b822a8f8430ef50d1b0bb422d0604 to your computer and use it in GitHub Desktop.

Select an option

Save alaingoldman/ab0b822a8f8430ef50d1b0bb422d0604 to your computer and use it in GitHub Desktop.
renderScene(route, navigator){
return <route.component navigator={navigator} />
}
render(){
return(
<Navigator
initialRoute={{component: RamNavigation}}
renderScene={this.renderScene.bind(this)} />
)
}
linker(comp){
this.props.navigator.push({
component: comp
})
}
<TextInput style={styles.ramInput}
onChangeText={(password) => this.setState({password})}
placeholder={"Enter password"}
secureTextEntry={true}
color={"white"}
placeholderTextColor={"#CCC"}
/>
@SaraBereket
Copy link

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Navigator,
} from 'react-native';
import Login from "./Login";

export default class parknpay extends Component {

renderScene(route, navigator){
return <route.component navigator={navigator} />
}

render(){
  return(
    <Navigator
      initialRoute={{component: Login}}
      renderScene={this.renderScene.bind(this)} />
      )
    }

}

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});

AppRegistry.registerComponent('parknpay', () => parknpay);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment