Skip to content

Commit 98ff3a6

Browse files
Working on docs
1 parent a07f224 commit 98ff3a6

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

readme.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You can look at [example](https://github.com/sergeyshpadyrev/react-native-easy-r
4747

4848
## Documentation
4949

50-
### Navigator params
50+
### Navigator properties
5151

5252
#### screens (_required_)
5353
Screen components keyed by screen name
@@ -59,7 +59,7 @@ _Example_:
5959

6060
#### initialStack (_required_)
6161

62-
Initial stack can be a first screen name, an array of screen names or even array of screen objects that are are returned from `navigator.stack`.
62+
Initial stack can be a first screen name, an array of screen names or even array of screen objects that are are returned from `navigator.stack` or `onStackUpdate`.
6363

6464
_Examples_:
6565
```
@@ -73,3 +73,29 @@ or
7373
```
7474
<Navigator initialStack={[{screen: 'First', props: {name: 'John'}, transitionProps: {animation: 'left'}}]}/>
7575
```
76+
77+
#### onStackUpdate
78+
Callback that is called when stack updates
79+
80+
_Example_:
81+
```
82+
<Navigator onStackUpdate={(stack, previousStack) => console.log(stack, previousStack)}/>
83+
```
84+
85+
#### backHandler
86+
_Default value_: `navigator => navigator.pop()`
87+
Function that is called when user presses back button on Android or makes swipe back on IOS
88+
If you return `false` from this function on Android app will be minimized
89+
90+
_Example_:
91+
```
92+
<Navigator backHandler={navigator => navigator.pop()}/>
93+
```
94+
95+
#### navigatorRef
96+
Callback that is called on navigator initialization with `navigator` reference so you can manage your navigator from outside.
97+
98+
_Example_:
99+
```
100+
<Navigator navigatorRef={ref => (this.navigator = ref)}/>
101+
```

0 commit comments

Comments
 (0)