-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #400 from joenoon/jn-pushToCurrent2
clone option on Scene to dynamically push to current parent
- Loading branch information
Showing
6 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
'use strict'; | ||
|
||
var React = require('react-native'); | ||
var {View, Text, StyleSheet} = React; | ||
var Button = require('react-native-button'); | ||
var Actions = require('react-native-router-flux').Actions; | ||
|
||
|
||
class EchoView extends React.Component { | ||
render(){ | ||
return ( | ||
<View style={[styles.container, this.props.sceneStyle]}> | ||
<Text style={styles.instructions}>key: {this.props.navigationState.key}</Text> | ||
<Text style={styles.instructions}>sceneKey: {this.props.navigationState.sceneKey}</Text> | ||
<Button onPress={Actions.echo}>push new scene</Button> | ||
<Button onPress={Actions.pop}>pop</Button> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
var styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: '#F5FCFF', | ||
}, | ||
instructions: { | ||
textAlign: 'center', | ||
color: '#333333', | ||
marginBottom: 5, | ||
}, | ||
}); | ||
|
||
module.exports = EchoView; |
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
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
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
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