Skip to content

Commit 72c1133

Browse files
authored
fix: typo and bottom-tabs example (#670)
Fixed a typo and changed the example in bottom-tabs to reflect the docs.
1 parent 3bf8ead commit 72c1133

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

website/static/examples/5.x/tab-based-navigation-minimal.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@ function SettingsScreen() {
2121

2222
const Tab = createBottomTabNavigator();
2323

24+
function MyTabs() {
25+
return (
26+
<Tab.Navigator>
27+
<Tab.Screen name="Home" component={HomeScreen} />
28+
<Tab.Screen name="Settings" component={SettingsScreen} />
29+
</Tab.Navigator>
30+
);
31+
}
32+
2433
export default function App() {
2534
return (
2635
<NavigationContainer>
27-
<Tab.Navigator>
28-
<Tab.Screen name="Home" component={HomeScreen} />
29-
<Tab.Screen name="Settings" component={SettingsScreen} />
30-
</Tab.Navigator>
36+
<MyTabs />
3137
</NavigationContainer>
3238
);
3339
}

website/versioned_docs/version-5.x/params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function DetailsScreen({ route, navigation }) {
6666

6767
Screens can also update their params, like they can update their state. The `navigation.setParams` method lets you update the params of a screen. Refer to the [API reference for `setParams`](navigation-prop.html#setparams---make-changes-to-route-params) for more details.
6868

69-
You can also pass some initial params to a screen. If you didn't specify any params when navigating to this screen, the initial params will be used. They are also shallow merged with any params that you pass. Initial params can be specified with an `initialparams` prop:
69+
You can also pass some initial params to a screen. If you didn't specify any params when navigating to this screen, the initial params will be used. They are also shallow merged with any params that you pass. Initial params can be specified with an `initialParams` prop:
7070

7171
```js
7272
<Stack.Screen

0 commit comments

Comments
 (0)