Skip to content

Commit 3f7398c

Browse files
johnnyreillytimdorr
authored andcommitted
Update API.md to mention routes as part of injected props (remix-run#4509)
There is no mention of the following in the Injected Props docs at present: #### `routes` The registered routes. Although when I'm debugging react-router 3.0.2 I can certainly see it there. So I've added it - hope that's helpful.
1 parent 21e4a1e commit 3f7398c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/API.md

+3
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,9 @@ The route that rendered this component.
546546
#### `router`
547547
Contains methods relevant to routing. Most useful for imperatively transitioning around the application.
548548

549+
#### `routes`
550+
The routes registered with the router.
551+
549552
#### `routeParams`
550553
A subset of `this.props.params` that were directly specified in this component's route. For example, if the route's path is `users/:userId` and the URL is `/users/123/portfolios/345` then `this.props.routeParams` will be `{userId: '123'}`, and `this.props.params` will be `{userId: '123', portfolioId: '345'}`.
551554

0 commit comments

Comments
 (0)