Skip to content

Commit 9b6277f

Browse files
authored
fix: typo in common-actions.js (react-navigation#673)
1 parent abca74f commit 9b6277f

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

website/static/examples/5.x/common-actions.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import * as React from 'react';
22
import { View, Button, Text } from 'react-native';
3-
import {
4-
NavigationContainer,
5-
CommonActions,
6-
} from '@react-navigation/native';
3+
import { NavigationContainer, CommonActions } from '@react-navigation/native';
74
import { createStackNavigator } from '@react-navigation/stack';
85

9-
function HomeScreen({ navigation, route }) {
6+
function HomeScreen({ navigation }) {
107
return (
118
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
129
<Text>Home!</Text>
@@ -86,15 +83,15 @@ function ProfileScreen({ navigation, route }) {
8683
);
8784
}
8885

89-
const Tab = createStackNavigator();
86+
const Stack = createStackNavigator();
9087

9188
export default function App() {
9289
return (
9390
<NavigationContainer>
94-
<Tab.Navigator>
95-
<Tab.Screen name="Home" component={HomeScreen} />
96-
<Tab.Screen name="Profile" component={ProfileScreen} />
97-
</Tab.Navigator>
91+
<Stack.Navigator>
92+
<Stack.Screen name="Home" component={HomeScreen} />
93+
<Stack.Screen name="Profile" component={ProfileScreen} />
94+
</Stack.Navigator>
9895
</NavigationContainer>
9996
);
10097
}

0 commit comments

Comments
 (0)