{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/2134","labels_url":"https://api.github.com/repos/rackt/react-router/issues/2134/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/2134/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/2134/events","html_url":"https://github.com/rackt/react-router/issues/2134","id":108944883,"number":2134,"title":"Deeply nested async routes do not mount component with Redux","user":{"login":"DarrenN","id":215030,"avatar_url":"https://avatars.githubusercontent.com/u/215030?v=3","gravatar_id":"","url":"https://api.github.com/users/DarrenN","html_url":"https://github.com/DarrenN","followers_url":"https://api.github.com/users/DarrenN/followers","following_url":"https://api.github.com/users/DarrenN/following{/other_user}","gists_url":"https://api.github.com/users/DarrenN/gists{/gist_id}","starred_url":"https://api.github.com/users/DarrenN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarrenN/subscriptions","organizations_url":"https://api.github.com/users/DarrenN/orgs","repos_url":"https://api.github.com/users/DarrenN/repos","events_url":"https://api.github.com/users/DarrenN/events{/privacy}","received_events_url":"https://api.github.com/users/DarrenN/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-29T19:44:52Z","updated_at":"2015-10-09T23:07:40Z","closed_at":"2015-09-30T13:35:33Z","body":"I have a small prototype using React, Redux and React-Router 1.0.0-rc1. The prototype uses Webpack to do code splitting. It currently uses getComponents and getChildRoutes to async load additional routes like so:\r\n\r\n```javascript\r\nmodule.exports = {\r\n  path: 'donations',\r\n\r\n  getChildRoutes(location, cb) {\r\n    require.ensure([], (require) => {\r\n      cb(null, [\r\n        require('./routes/Donation'),\r\n      ]);\r\n    });\r\n  },\r\n\r\n  getComponent(location, cb) {\r\n    require.ensure([], (require) => {\r\n      cb(null, require('./components/Donations'));\r\n    });\r\n  }\r\n};\r\n```\r\n\r\nThis works fine, until I hit the nested route `donations/:id`, which looks like:\r\n\r\n```javascript\r\nmodule.exports = {\r\n  path: ':id',\r\n\r\n  getComponent(location, cb) {\r\n    require.ensure([], (require) => {\r\n      let mod = require('./components/Donation');\r\n      console.log('module loaded', mod);\r\n      cb(null, mod);\r\n    });\r\n  }\r\n};\r\n```\r\n\r\nWhen I navigate to this route (ex: `/donations/123`), the route is triggered, the bundle.js file is loaded, and the `console.log` values appear in the console, so I know that the route was loaded up into memory. **However**, the component is not mounted and rendered.\r\n\r\nThe component that is returned is wrapped with Redux's Connect like so:\r\n\r\n```javascript\r\n function Connect(props, context) {\r\n          _classCallCheck(this, Connect);\r\n          _Component.call(this, props, context);\r\n          this.version = version;\r\n          this.store = props.store || c… \r\n```\r\n\r\nAsync routes one level deep are fine, but nesting past that doesn't work. The component is loaded, but it doesn't seem like it's executed. I'm going to take a guess that somehow the component being wrapped in `Connect` might be causing problems, but am not sure how to address."},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/147008006","html_url":"https://github.com/rackt/react-router/issues/2134#issuecomment-147008006","issue_url":"https://api.github.com/repos/rackt/react-router/issues/2134","id":147008006,"user":{"login":"szhclaye","id":10787099,"avatar_url":"https://avatars.githubusercontent.com/u/10787099?v=3","gravatar_id":"","url":"https://api.github.com/users/szhclaye","html_url":"https://github.com/szhclaye","followers_url":"https://api.github.com/users/szhclaye/followers","following_url":"https://api.github.com/users/szhclaye/following{/other_user}","gists_url":"https://api.github.com/users/szhclaye/gists{/gist_id}","starred_url":"https://api.github.com/users/szhclaye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szhclaye/subscriptions","organizations_url":"https://api.github.com/users/szhclaye/orgs","repos_url":"https://api.github.com/users/szhclaye/repos","events_url":"https://api.github.com/users/szhclaye/events{/privacy}","received_events_url":"https://api.github.com/users/szhclaye/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T23:07:40Z","updated_at":"2015-10-09T23:07:40Z","body":"Like here https://github.com/rackt/react-router/blob/master/docs/API.md#router"}}