{"action":"created","issue":{"url":"https://api.github.com/repos/reactjs/react-router/issues/3729","repository_url":"https://api.github.com/repos/reactjs/react-router","labels_url":"https://api.github.com/repos/reactjs/react-router/issues/3729/labels{/name}","comments_url":"https://api.github.com/repos/reactjs/react-router/issues/3729/comments","events_url":"https://api.github.com/repos/reactjs/react-router/issues/3729/events","html_url":"https://github.com/reactjs/react-router/pull/3729","id":171527701,"number":3729,"title":"Allow a router prop to take priority over context prop.","user":{"login":"elyobo","id":407806,"avatar_url":"https://avatars.githubusercontent.com/u/407806?v=3","gravatar_id":"","url":"https://api.github.com/users/elyobo","html_url":"https://github.com/elyobo","followers_url":"https://api.github.com/users/elyobo/followers","following_url":"https://api.github.com/users/elyobo/following{/other_user}","gists_url":"https://api.github.com/users/elyobo/gists{/gist_id}","starred_url":"https://api.github.com/users/elyobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyobo/subscriptions","organizations_url":"https://api.github.com/users/elyobo/orgs","repos_url":"https://api.github.com/users/elyobo/repos","events_url":"https://api.github.com/users/elyobo/events{/privacy}","received_events_url":"https://api.github.com/users/elyobo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-16T21:56:04Z","updated_at":"2016-08-16T22:53:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/reactjs/react-router/pulls/3729","html_url":"https://github.com/reactjs/react-router/pull/3729","diff_url":"https://github.com/reactjs/react-router/pull/3729.diff","patch_url":"https://github.com/reactjs/react-router/pull/3729.patch"},"body":"withRouter should allow a router prop specified on a wrapped component\r\nto be used instead of the router in context; this pattern is more\r\nflexible, avoids overwriting explicitly set tests, and makes testing\r\ncomponents wrapped by withRouter more simple."},"comment":{"url":"https://api.github.com/repos/reactjs/react-router/issues/comments/240264227","html_url":"https://github.com/reactjs/react-router/pull/3729#issuecomment-240264227","issue_url":"https://api.github.com/repos/reactjs/react-router/issues/3729","id":240264227,"user":{"login":"elyobo","id":407806,"avatar_url":"https://avatars.githubusercontent.com/u/407806?v=3","gravatar_id":"","url":"https://api.github.com/users/elyobo","html_url":"https://github.com/elyobo","followers_url":"https://api.github.com/users/elyobo/followers","following_url":"https://api.github.com/users/elyobo/following{/other_user}","gists_url":"https://api.github.com/users/elyobo/gists{/gist_id}","starred_url":"https://api.github.com/users/elyobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyobo/subscriptions","organizations_url":"https://api.github.com/users/elyobo/orgs","repos_url":"https://api.github.com/users/elyobo/repos","events_url":"https://api.github.com/users/elyobo/events{/privacy}","received_events_url":"https://api.github.com/users/elyobo/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T22:53:01Z","updated_at":"2016-08-16T22:53:01Z","body":"I see what you mean about the priority for `defaultMergeProps`; you're right that props specified on the component will potentially overwritten by props generated from the state or dispatch mapping.  I think that the behaviour I'm introducing here is the same as that of the HOC that connect generates, in that a specified prop (from any of those sources) will take priority over the context.\r\n\r\nThat said, this is potentially a BC problem (if someone is currently specifying a router prop it's being ignored; that won't be the case after this change) and it's ultimately easy to roll my own `withRouter` and use that instead if I want this behaviour, so feel free to close if you're happier with it the way it is :)"}}
{"actor":{"display_login":"elyobo"}}