{"action":"closed","issue":{"url":"https://api.github.com/repos/reactjs/react-router-redux/issues/385","repository_url":"https://api.github.com/repos/reactjs/react-router-redux","labels_url":"https://api.github.com/repos/reactjs/react-router-redux/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/reactjs/react-router-redux/issues/385/comments","events_url":"https://api.github.com/repos/reactjs/react-router-redux/issues/385/events","html_url":"https://github.com/reactjs/react-router-redux/issues/385","id":152548014,"number":385,"title":"Does not work with history@^3","user":{"login":"gajus","id":973543,"avatar_url":"https://avatars.githubusercontent.com/u/973543?v=3","gravatar_id":"","url":"https://api.github.com/users/gajus","html_url":"https://github.com/gajus","followers_url":"https://api.github.com/users/gajus/followers","following_url":"https://api.github.com/users/gajus/following{/other_user}","gists_url":"https://api.github.com/users/gajus/gists{/gist_id}","starred_url":"https://api.github.com/users/gajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gajus/subscriptions","organizations_url":"https://api.github.com/users/gajus/orgs","repos_url":"https://api.github.com/users/gajus/repos","events_url":"https://api.github.com/users/gajus/events{/privacy}","received_events_url":"https://api.github.com/users/gajus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-02T12:59:49Z","updated_at":"2016-05-02T14:40:39Z","closed_at":"2016-05-02T14:40:39Z","body":"Using:\r\n\r\n* react-router-redux@v4.0.4\r\n* history@3.0.0-2\r\n\r\nOriginal issue description (relevant):\r\n\r\n> I have spent a good 3 hours trying to understand the underlying issue, but have not found anything that would strike as incompatible. All docs include a variation of this setup that is supposed to work:\r\n> \r\n> ```js\r\n> import React from 'react';\r\n> import ReactDOM from 'react-dom';\r\n> import {\r\n>     Provider\r\n> } from 'react-redux';\r\n> import store from './store';\r\n> import {\r\n>     Route,\r\n>     Router,\r\n>     useRouterHistory\r\n> } from 'react-router';\r\n> import {\r\n>     createHistory\r\n> } from 'history';\r\n> import {\r\n>     syncHistoryWithStore\r\n> } from 'react-router-redux';\r\n> \r\n> const browserHistory = useRouterHistory(createHistory)();\r\n> \r\n> const history = syncHistoryWithStore(browserHistory, store, {\r\n>     selectLocationState (state) {\r\n>         return state.getIn(['route']).toJS();\r\n>     }\r\n> });\r\n> \r\n> history.listen((location) => {\r\n>     console.log('location', location);\r\n> });\r\n> \r\n> ReactDOM.render(<Provider store={store}>\r\n>     <Router history={history}>\r\n>         <Route path='*' component={() => { console.log('Hello!'); }}>\r\n>             <div>Hello!</div>\r\n>         </Route>\r\n>     </Router>\r\n> </Provider>, document.querySelector('#app'));\r\n> \r\n> ```\r\n> \r\n> However, using `browserHistory` exported from `react-router` works without an issue:\r\n> \r\n> ```js\r\n> import React from 'react';\r\n> import ReactDOM from 'react-dom';\r\n> import {\r\n>     Provider\r\n> } from 'react-redux';\r\n> import store from './store';\r\n> import {\r\n>     Route,\r\n>     Router,\r\n>     // useRouterHistory\r\n>     browserHistory\r\n> } from 'react-router';\r\n> import {\r\n>     createHistory\r\n> } from 'history';\r\n> import {\r\n>     syncHistoryWithStore\r\n> } from 'react-router-redux';\r\n> \r\n> // const browserHistory = useRouterHistory(createHistory)();\r\n> \r\n> const history = syncHistoryWithStore(browserHistory, store, {\r\n>     selectLocationState (state) {\r\n>         return state.getIn(['route']).toJS();\r\n>     }\r\n> });\r\n> \r\n> history.listen((location) => {\r\n>     console.log('location', location);\r\n> });\r\n> \r\n> ReactDOM.render(<Provider store={store}>\r\n>     <Router history={history}>\r\n>         <Route path='*' component={() => { console.log('Hello!'); }}>\r\n>             <div>Hello!</div>\r\n>         </Route>\r\n>     </Router>\r\n> </Provider>, document.querySelector('#app'));\r\n> \r\n> ```\r\n> \r\n> When I say \"does not work\", I mean:\r\n> \r\n> * `history.listen` logs `location` as `undefined`.\r\n> * No routes are resolved.\r\n> \r\n> When I say \"works\", I mean:\r\n> \r\n> * `history.listen` logs `location` as: `{pathname: \"/\", search: \"\", hash: \"\", state: null, action: \"POP\"…}`\r\n> * `*` route is resolved.> "}}