mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-08 09:13:02 +08:00
Merge pull request #49 from react-navigation/@brent/queued-transitions
Rethink queued transitions
This commit is contained in:
@@ -9,11 +9,29 @@ const Buttons = withNavigation(props => (
|
||||
title="Go to Details"
|
||||
onPress={() => props.navigation.navigate('Details')}
|
||||
/>
|
||||
<Button
|
||||
title="Go and then go to details quick"
|
||||
onPress={() => {
|
||||
props.navigation.pop();
|
||||
setTimeout(() => {
|
||||
props.navigation.navigate('Details');
|
||||
}, 100);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
title="Go to Headerless"
|
||||
onPress={() => props.navigation.navigate('Headerless')}
|
||||
/>
|
||||
<Button title="Go back" onPress={() => props.navigation.goBack()} />
|
||||
<Button
|
||||
title="Go back quick"
|
||||
onPress={() => {
|
||||
props.navigation.pop();
|
||||
setTimeout(() => {
|
||||
props.navigation.pop();
|
||||
}, 100);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
title="Go back to all examples"
|
||||
onPress={() => props.navigation.navigate('Home')}
|
||||
@@ -26,6 +44,14 @@ class ListScreen extends React.Component {
|
||||
title: 'List',
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
console.log('ListScreen didMount');
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
console.log('ListScreen willUnmount');
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View
|
||||
@@ -52,6 +78,14 @@ class DetailsScreen extends React.Component {
|
||||
},
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
console.log('DetailsScreen didMount');
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
console.log('DetailsScreen willUnmount');
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View
|
||||
@@ -81,6 +115,14 @@ class HeaderlessScreen extends React.Component {
|
||||
header: null,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
console.log('HeaderlessScreen didMount');
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
console.log('HeaderlessScreen willUnmount');
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View
|
||||
|
||||
Reference in New Issue
Block a user