Skip to content

Commit a07f224

Browse files
Working on docs
1 parent 142d425 commit a07f224

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

readme.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,33 @@ const Application = () => <Navigator screens={{ First, Second }} initialStack='F
4343
AppRegistry.registerComponent(name, () => Application)
4444

4545
```
46+
You can look at [example](https://github.com/sergeyshpadyrev/react-native-easy-router/tree/v3/example) for better understanding
47+
48+
## Documentation
49+
50+
### Navigator params
51+
52+
#### screens (_required_)
53+
Screen components keyed by screen name
54+
55+
_Example_:
56+
```
57+
<Navigator screens={{ Welcome: ({navigator}) => <View/> }}/>
58+
```
59+
60+
#### initialStack (_required_)
61+
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`.
63+
64+
_Examples_:
65+
```
66+
<Navigator initialStack='First'/>
67+
```
68+
or
69+
```
70+
<Navigator initialStack={['First', 'Second']}/>
71+
```
72+
or
73+
```
74+
<Navigator initialStack={[{screen: 'First', props: {name: 'John'}, transitionProps: {animation: 'left'}}]}/>
75+
```

0 commit comments

Comments
 (0)