Skip to content

Commit f8a7ef0

Browse files
committed
chore: demonstrate incrementing a param
1 parent 9773ee8 commit f8a7ef0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/screens/details.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export function DetailsScreen() {
1515
return (
1616
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
1717
<Text>You are currently {depth} screens deep</Text>
18+
<Button onPress={() => navigation.setParams({depth: (depth + 1)})}>Increment Depth</Button>
1819
<Button onPress={() => navigation.push('Details', {depth: (depth + 1)})}>Go Deeper</Button>
1920
<Button onPress={() => navigation.goBack('Details')}>Go Back</Button>
2021
<Button onPress={() => navigation.popTo('Home')}>Go Home</Button>

0 commit comments

Comments
 (0)