You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`willFocus`: Emitted when a route will focus. Emits the route name as a string.
`didFocus`: Emitted when a route did focus. Emits the route name as a string.
`willPop`: Emitted when a route stack will be popped. Triggered by `Navigator.pop();`
`didPop`: Emitted when a route stack did pop. Triggered by `Navigator.pop();`
`willPush`: Emitted when a new route will be pushed to the route stack. Emits the new route object. Triggered by `Navigator.push(route);`
`didPush`: Emitted when a new route has been pushed to the route stack. Emits the new route object. Triggered by `Navigator.push(route);`
`willResetTo`: Emitted when the route stack will be reset to a given route. Emits the route object. Triggered by `Navigator.resetTo(route);`
`didResetTo`: Emitted when the route stack has been reset to a given route. Emits the route object. Triggered by `Navigator.resetTo(route);`
`willReplace`: Emitted when a route will replace the current one in the route stack. Emits the new route object. Triggered by `Navigator.reset(route);`
`didReplace`: Emitted when a route has replaced the current one in the route stack. Emits the new route object. Triggered by `Navigator.reset(route);`
`willPopToTop`: Emitted when the route stack will be popped to the top. Triggered by `Navigator.popToTop();`
`didPopToTop`: Emitted when the route stack has been popped to the top. Triggered by `Navigator.popToTop();`
Copy file name to clipboardExpand all lines: README.md
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -145,13 +145,26 @@ The functions **`this.props.setRightProps`**, **`this.props.setLeftProps`** and
145
145
- This allows you to talk directly to your navbar, because previously you could only talk to it when navigating forward or backward.
146
146
147
147
148
-
Events emitted by the router:
149
-
`didFocus`, emits route name
150
-
You can add a listener to a component as such:
148
+
As of 0.7.0 the router acts as a relay for events emitted by the navigator, and extends these to the following list:
149
+
150
+
`willFocus`: Emitted when a route will focus. Emits the route name as a string.
151
+
`didFocus`: Emitted when a route did focus. Emits the route name as a string.
152
+
`willPop`: Emitted when a route stack will be popped. Triggered by `Navigator.pop();`
153
+
`didPop`: Emitted when a route stack did pop. Triggered by `Navigator.pop();`
154
+
`willPush`: Emitted when a new route will be pushed to the route stack. Emits the new route object. Triggered by `Navigator.push(route);`
155
+
`didPush`: Emitted when a new route has been pushed to the route stack. Emits the new route object. Triggered by `Navigator.push(route);`
156
+
`willResetTo`: Emitted when the route stack will be reset to a given route. Emits the route object. Triggered by `Navigator.resetTo(route);`
157
+
`didResetTo`: Emitted when the route stack has been reset to a given route. Emits the route object. Triggered by `Navigator.resetTo(route);`
158
+
`willReplace`: Emitted when a route will replace the current one in the route stack. Emits the new route object. Triggered by `Navigator.reset(route);`
159
+
`didReplace`: Emitted when a route has replaced the current one in the route stack. Emits the new route object. Triggered by `Navigator.reset(route);`
160
+
`willPopToTop`: Emitted when the route stack will be popped to the top. Triggered by `Navigator.popToTop();`
161
+
`didPopToTop`: Emitted when the route stack has been popped to the top. Triggered by `Navigator.popToTop();`
162
+
163
+
You can listen to these events by adding an event listener as such:
0 commit comments