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
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/custom-routers.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,9 +150,10 @@ The library ships with a few standard routers:
150
150
151
151
## Customizing Routers
152
152
153
-
You can reuse a router and override the router functions as per your needs, such as customizing how existing actions are handled, adding additional actions etc.
153
+
There are two main ways to customize routers:
154
154
155
-
See [custom navigators](custom-navigators.md) for details on how to override the router with a custom router in an existing navigator.
155
+
- Override an existing router with the [`UNSTABLE_router`](navigator.md#router) prop on navigators
156
+
- Customized navigators with a custom router, see [extending navigators](custom-navigators.md#extending-navigators)
The function passed to `UNSTABLE_router`**must be a pure function and cannot reference outside dynamic variables**.
382
+
383
+
The overrides object is shallow merged with the original router. So you don't need to specify all properties of the router, only the ones you want to override.
384
+
385
+
See [custom routers](custom-routers.md) for more details on routers.
0 commit comments