Skip to content
This repository was archived by the owner on Dec 3, 2022. It is now read-only.

Commit a895bb2

Browse files
authored
Update README.md
1 parent 67818c9 commit a895bb2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
🏄‍♀️ 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!
88

9-
### useNavigation
9+
### useNavigation()
1010

1111
This is the main convenience hook. It provides the regular navigation prop, as you'd get via the screen prop or by using `withNavigation`.
1212

@@ -27,7 +27,7 @@ function MyLinkButton() {
2727
}
2828
```
2929

30-
### useNavigationParam
30+
### useNavigationParam(paramName)
3131

3232
Access a param for the current navigation state
3333

@@ -40,7 +40,7 @@ function MyScreen() {
4040

4141
Literally the same as `useNavigation().getParam(paramName)`
4242

43-
### useNavigationState
43+
### useNavigationState()
4444

4545
Access the navigation state of the current route, or if you're in a navigator view, access the navigation state of your sub-tree.
4646

@@ -53,13 +53,13 @@ function MyScreen() {
5353

5454
Literally the same as `useNavigation().state`
5555

56-
### useNavigationKey
56+
### useNavigationKey()
5757

5858
Convenient way to access the key of the current route.
5959

6060
Literally the same as `useNavigationState().key`
6161

62-
### useNavigationEvents
62+
### useNavigationEvents(handler)
6363

6464
Subscribe to navigation events in the current route context.
6565

@@ -86,7 +86,7 @@ function ReportNavigationEvents() {
8686

8787
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
8888

89-
### useFocusState
89+
### useFocusState()
9090

9191
Convenient way of subscribing to events and observing focus state of the current screen.
9292

0 commit comments

Comments
 (0)