Skip to content

Commit d435bc9

Browse files
committed
added new Routes props handler documentation
1 parent b39e012 commit d435bc9

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

docs/api/components/Routes.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,36 @@ If `true`, the router will not scroll the window up globally when any
2727
route is transitioned to. Defaults to `false`. When `false`, the
2828
`<Route/>` gets to decide whether or not to scroll on transition.
2929

30+
### `onAbortedTransition`
31+
32+
A function called when any transition is aborted.
33+
34+
### `onActiveStateChange`
35+
36+
A function called when the active routes change.
37+
38+
#### signature
39+
40+
`function(nextState)`
41+
42+
### `onTransitionError`
43+
44+
A function called when a transition has an error.
45+
46+
#### signature
47+
48+
`function(error)`
49+
3050
Example
3151
-------
3252

3353
```jsx
54+
function onError(error) {
55+
handleError(error);
56+
}
57+
3458
var routes = (
35-
<Routes location="history">
59+
<Routes location="history" onTransitionError={onError}>
3660
<Route handler={App}/>
3761
</Routes>
3862
);

0 commit comments

Comments
 (0)