You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 3, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
🏄♀️ Surfing the wave of React Hook hype with a few convenience hooks for `@react-navigation/core` v3. Destined to work on web, server, and React Native. Contributions welcome!
8
8
9
-
### useNavigation
9
+
### useNavigation()
10
10
11
11
This is the main convenience hook. It provides the regular navigation prop, as you'd get via the screen prop or by using `withNavigation`.
12
12
@@ -27,7 +27,7 @@ function MyLinkButton() {
27
27
}
28
28
```
29
29
30
-
### useNavigationParam
30
+
### useNavigationParam(paramName)
31
31
32
32
Access a param for the current navigation state
33
33
@@ -40,7 +40,7 @@ function MyScreen() {
40
40
41
41
Literally the same as `useNavigation().getParam(paramName)`
42
42
43
-
### useNavigationState
43
+
### useNavigationState()
44
44
45
45
Access the navigation state of the current route, or if you're in a navigator view, access the navigation state of your sub-tree.
46
46
@@ -53,13 +53,13 @@ function MyScreen() {
53
53
54
54
Literally the same as `useNavigation().state`
55
55
56
-
### useNavigationKey
56
+
### useNavigationKey()
57
57
58
58
Convenient way to access the key of the current route.
59
59
60
60
Literally the same as `useNavigationState().key`
61
61
62
-
### useNavigationEvents
62
+
### useNavigationEvents(handler)
63
63
64
64
Subscribe to navigation events in the current route context.
65
65
@@ -86,7 +86,7 @@ function ReportNavigationEvents() {
86
86
87
87
The event payload will be the same as provided by `addListener`, as documented here: https://reactnavigation.org/docs/en/navigation-prop.html#addlistener-subscribe-to-updates-to-navigation-lifecycle
88
88
89
-
### useFocusState
89
+
### useFocusState()
90
90
91
91
Convenient way of subscribing to events and observing focus state of the current screen.
0 commit comments