diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md index 231c6670aa..de68c97753 100644 --- a/docs/Troubleshooting.md +++ b/docs/Troubleshooting.md @@ -70,4 +70,10 @@ There are multiple ways to do this depending on what you want to do. You can: - Define additional values on `` or the plain route. This will make those values available on `this.props.route` on route components. - Pass in a `createElement` handler to `` or ``. This will allow you to inject additional props into route elements at creation time. +- Pass in a `render` handler to `` with the result of `applyRouterMiddleware`, using a middleware such as: +```javascript +extraProps => ({ + renderRouteComponent: (child) => React.cloneElement(child, extraProps) +}) +``` - Define a top-level component above `` or `` that exports additional values via `getChildContext`, then access them via context from rendered components.