@@ -3,7 +3,7 @@ React Native Simple Router
33
44Awesome navigation for your React Native app.
55
6- ![ NavBar Example] ( https ://camo.githubusercontent .com/1e8083920215b01ed81fcd054dd01fe709e16a85/687474703a2f2f7472697374616e656477617264732e6d652f752f72656163742d6e61746976652d726f757465722f6e61746976652d726f757465722e676966 )
6+ ![ NavBar Example] ( http ://i.imgur .com/h5jUDC8.png )
77
88Install
99-------
@@ -165,8 +165,8 @@ The functions **`this.props.setRightProps`**, **`this.props.setLeftProps`** and
165165
166166As of 0.7.0 the router acts as a relay for events emitted by the navigator, and extends these to the following list:
167167
168- - ` willFocus ` : Emitted when a route will focus. Emits the route name as a string .
169- - ` didFocus ` : Emitted when a route did focus. Emits the route name as a string .
168+ - ` willFocus ` : Emitted when a route will focus. Emits route object .
169+ - ` didFocus ` : Emitted when a route did focus. Emits route object .
170170 - ` willPop ` : Emitted when a route stack will be popped. Triggered by ` Navigator.pop(); `
171171 - ` didPop ` : Emitted when a route stack did pop. Triggered by ` Navigator.pop(); `
172172 - ` willPush ` : Emitted when a new route will be pushed to the route stack. Emits the new route object. Triggered by ` Navigator.push(route); `
@@ -181,9 +181,9 @@ As of 0.7.0 the router acts as a relay for events emitted by the navigator, and
181181You can listen to these events by adding an event listener as such:
182182
183183``` javascript
184- this .props .routeEmitter .addListener (' didFocus' , (name ) => {
185- // Do something with name..
186- });
184+ this .props .routeEmitter .addListener (' didFocus' , (route ) => {
185+ console . log ( route . name , ' didFocus ' );
186+ });
187187```
188188
189189As of v0.8.0 the ` leftCorner ` , ` rightCorner ` and ` titleComponent ` have access to the following router functions :
0 commit comments