Skip to content

Commit 51d8061

Browse files
committed
Reset & Navigator is reachable now. README is updated
1 parent 80664a2 commit 51d8061

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,27 @@ NavigationService.popToTop()
7676
NavigationService.back()
7777
```
7878

79+
## How to pass prop with this library?
80+
81+
The usage does not change. Simply put your prop as the secondary prop **as same as React Navigation** itself.
82+
83+
#### Navigate
84+
```js
85+
NavigationService.navigate("home", {data: myData, myId: "d1f01df1" })
86+
```
87+
88+
#### Push
89+
```js
90+
NavigationService.push("home", {data: myData, myId: "d1f01df1" })
91+
```
92+
93+
94+
## How to receive the passed props from navigation or push functions?
95+
96+
```js
97+
const data = props.navigation.getParam("data", null) // Second one is default value
98+
const myId = props.navigation.getParam("myId", "") // Second one is default value
99+
```
79100

80101
### Configuration - Props
81102

lib/src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export default {
4444
pop,
4545
push,
4646
back,
47+
reset,
4748
popToTop,
4849
navigate,
50+
navigator,
4951
setGlobalLevelNavigator
5052
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-navigation-helpers",
3-
"version": "0.0.11",
3+
"version": "0.1.0",
44
"description": "Helpers for React Navigation",
55
"keywords": [
66
"helpers",

0 commit comments

Comments
 (0)