Skip to content

Commit

Permalink
Update Route.js
Browse files Browse the repository at this point in the history
There are a lot of request about passing props from Route to Component (ex remix-run#615 (comment))
This provide access to everything we pass from the Route component without broken its kinda of render
  • Loading branch information
Manuelandro committed Apr 13, 2017
1 parent ed6f3de commit 5f6cd5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-router/modules/Route.js
Expand Up @@ -98,7 +98,7 @@ class Route extends React.Component {
const { children, component, render } = this.props
const { history, route, staticContext } = this.context.router
const location = this.props.location || route.location
const props = { match, location, history, staticContext }
const props = { ...this.props, match, location, history, staticContext }

return (
component ? ( // component prop gets first priority, only called if there's a match
Expand Down

0 comments on commit 5f6cd5d

Please sign in to comment.