File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
versioned_docs/version-6.x Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,9 @@ navigation.dispatch(DrawerActions.toggleDrawer());
96
96
If you would like to determine if drawer is open or closed, you can do the following:
97
97
98
98
``` js
99
- import { useIsDrawerOpen } from ' @react-navigation/drawer' ;
99
+ import { useDrawerStatus } from ' @react-navigation/drawer' ;
100
100
101
101
// ...
102
102
103
- const isDrawerOpen = useIsDrawerOpen () ;
103
+ const isDrawerOpen = useDrawerStatus () === ' open ' ;
104
104
```
Original file line number Diff line number Diff line change @@ -568,14 +568,14 @@ function MyDrawer() {
568
568
569
569
## Checking if the drawer is open
570
570
571
- You can check if the drawer is open by using the ` useIsDrawerOpen ` hook.
571
+ You can check if the drawer is open by using the ` useDrawerStatus ` hook.
572
572
573
573
``` js
574
- import { useIsDrawerOpen } from ' @react-navigation/drawer' ;
574
+ import { useDrawerStatus } from ' @react-navigation/drawer' ;
575
575
576
576
// ...
577
577
578
- const isDrawerOpen = useIsDrawerOpen () ;
578
+ const isDrawerOpen = useDrawerStatus () === ' open ' ;
579
579
```
580
580
581
581
## Nesting drawer navigators inside others
You can’t perform that action at this time.
0 commit comments