File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,27 @@ NavigationService.popToTop()
7676NavigationService .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
Original file line number Diff line number Diff 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} ;
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments