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

Commit 092e7ab

Browse files
authored
Merge pull request #5 from nem035/patch-1
Add correct code example for the getParam hook
2 parents 7608753 + 61d87db commit 092e7ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ Access a param for the current navigation state
4444

4545
```js
4646
function MyScreen() {
47-
const { routeName } = useNavigationState();
48-
return <p>My route name is {routeName}</p>;
47+
const name = useNavigationParam('name');
48+
return <p>name is {name}</p>;
4949
}
5050
```
5151

0 commit comments

Comments
 (0)