Skip to content

Commit bc8cb4c

Browse files
Removed some typos from drawer-navigator.md
1 parent b9fef6f commit bc8cb4c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

versioned_docs/version-6.x/drawer-navigator.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ npm install @react-navigation/drawer
2222

2323
You also need to install [`react-native-gesture-handler`](https://docs.swmansion.com/react-native-gesture-handler/) and [`react-native-reanimated`](https://docs.swmansion.com/react-native-reanimated/).
2424

25-
If you have a Expo managed project, in your project directory, run:
25+
If you have an Expo managed project, in your project directory, run:
2626

2727
```sh
2828
expo install react-native-gesture-handler react-native-reanimated
@@ -73,15 +73,15 @@ The `Drawer.Navigator` component accepts following props:
7373

7474
#### `initialRouteName`
7575

76-
The name of the route to render on first load of the navigator.
76+
The name of the route to render on the first load of the navigator.
7777

7878
#### `screenOptions`
7979

8080
Default options to use for the screens in the navigator.
8181

8282
#### `backBehavior`
8383

84-
This controls how going back in the navigator is handled. This includes when the back button is pressed/back gesture is performed, or `goBack` is called.
84+
This controls how going back in the navigator is handled. This includes when the back button is pressed, back gesture is performed, or `goBack` is called.
8585

8686
It supports the following values:
8787

@@ -95,7 +95,7 @@ It supports the following values:
9595

9696
The default status of the drawer - whether the drawer should stay `open` or `closed` by default.
9797

98-
When this is set to `open`, the drawer will be open from the initial render. It can be closed normally using gestures or programmatically. However, when going back, drawer will re-open if it was closed. This is essentially the opposite of the default behavior of the drawer where it starts `closed`, and back button closes an open drawer.
98+
When this is set to `open`, the drawer will be open from the initial render. It can be closed normally using gestures or programmatically. However, when going back, the drawer will re-open if it was closed. This is essentially the opposite of the default behavior of the drawer where it starts `closed`, and the back button closes an open drawer.
9999

100100
#### `detachInactiveScreens`
101101

@@ -107,7 +107,7 @@ Whether the screens should render the first time they are accessed. Defaults to
107107

108108
Whether to use the legacy implementation based on Reanimated 1. The new implementation based on Reanimated 2 will perform better, but you need additional configuration and need to use Hermes with Flipper to debug.
109109

110-
This defaults to `true` in following cases:
110+
This defaults to `true` in the following cases:
111111

112112
- Reanimated 2 is not configured
113113
- App is connected to Chrome debugger (Reanimated 2 cannot be used with Chrome debugger)
@@ -119,7 +119,7 @@ Otherwise, it defaults to `false`
119119

120120
Function that returns React element to render as the content of the drawer, for example, navigation items
121121

122-
The content component receives following props by default:
122+
The content component receives the following props by default:
123123

124124
- `state` - The [navigation state](navigation-state.md) of the navigator.
125125
- `navigation` - The navigation object for the navigator.
@@ -130,7 +130,7 @@ The content component receives following props by default:
130130

131131
The default component for the drawer is scrollable and only contains links for the routes in the RouteConfig. You can easily override the default component to add a header, footer, or other content to the drawer. The default content component is exported as `DrawerContent`. It renders a `DrawerItemList` component inside a `ScrollView`.
132132

133-
By default the drawer is scrollable and supports devices with notches. If you customize the content, you can use `DrawerContentScrollView` to handle this automatically:
133+
By default, the drawer is scrollable and supports devices with notches. If you customize the content, you can use `DrawerContentScrollView` to handle this automatically:
134134

135135
```js
136136
import {
@@ -231,7 +231,7 @@ The following [options](screen-options.md) can be used to configure the screens
231231

232232
#### `title`
233233

234-
Generic title that can be used as a fallback for `headerTitle` and `drawerLabel`.
234+
A generic title that can be used as a fallback for `headerTitle` and `drawerLabel`.
235235

236236
#### `lazy`
237237

@@ -304,7 +304,7 @@ Options are `left` or `right`. Defaults to `left` for LTR languages and `right`
304304

305305
Type of the drawer. It determines how the drawer looks and animates.
306306

307-
- `front`: Traditional drawer which covers the screen with a overlay behind it.
307+
- `front`: Traditional drawer which covers the screen with an overlay behind it.
308308
- `back`: The drawer is revealed behind the screen on swipe.
309309
- `slide`: Both the screen and the drawer slide on swipe to reveal the drawer.
310310
- `permanent`: A permanent drawer is shown as a sidebar. Useful for having always visible drawer on larger screens.
@@ -513,7 +513,7 @@ navigation.toggleDrawer();
513513

514514
#### `jumpTo`
515515

516-
Navigates to an existing screen in the drawer navigator. The method accepts following arguments:
516+
Navigates to an existing screen in the drawer navigator. The method accepts the following arguments:
517517

518518
- `name` - _string_ - Name of the route to jump to.
519519
- `params` - _object_ - Screen params to pass to the destination route.
@@ -578,7 +578,7 @@ import { getDrawerStatusFromState } from '@react-navigation/drawer';
578578
const isDrawerOpen = getDrawerStatusFromState(navigation.getState()) === 'open';
579579
```
580580

581-
For class components, you can listen tp the `state` event to check if drawer was opened or closed:
581+
For class components, you can listen to the `state` event to check if drawer was opened or closed:
582582

583583
```js
584584
class Profile extends React.Component {
@@ -603,4 +603,4 @@ class Profile extends React.Component {
603603

604604
## Nesting drawer navigators inside others
605605

606-
If a drawer navigator is nested inside of another navigator that provides some UI, for example a tab navigator or stack navigator, then the drawer will be rendered below the UI from those navigators. The drawer will appear below the tab bar and below the header of the stack. You will need to make the drawer navigator the parent of any navigator where the drawer should be rendered on top of its UI.
606+
If a drawer navigator is nested inside of another navigator that provides some UI, for example, a tab navigator or stack navigator, then the drawer will be rendered below the UI from those navigators. The drawer will appear below the tab bar and below the header of the stack. You will need to make the drawer navigator the parent of any navigator where the drawer should be rendered on top of its UI.

0 commit comments

Comments
 (0)