{"action":"created","issue":{"url":"https://api.github.com/repos/ModusCreateOrg/react-dynamic-route-loading-es6/issues/6","repository_url":"https://api.github.com/repos/ModusCreateOrg/react-dynamic-route-loading-es6","labels_url":"https://api.github.com/repos/ModusCreateOrg/react-dynamic-route-loading-es6/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/ModusCreateOrg/react-dynamic-route-loading-es6/issues/6/comments","events_url":"https://api.github.com/repos/ModusCreateOrg/react-dynamic-route-loading-es6/issues/6/events","html_url":"https://github.com/ModusCreateOrg/react-dynamic-route-loading-es6/issues/6","id":177058988,"number":6,"title":"how would i implement dynamic-routes-loading of components? ","user":{"login":"jasan-s","id":13863953,"avatar_url":"https://avatars.githubusercontent.com/u/13863953?v=3","gravatar_id":"","url":"https://api.github.com/users/jasan-s","html_url":"https://github.com/jasan-s","followers_url":"https://api.github.com/users/jasan-s/followers","following_url":"https://api.github.com/users/jasan-s/following{/other_user}","gists_url":"https://api.github.com/users/jasan-s/gists{/gist_id}","starred_url":"https://api.github.com/users/jasan-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasan-s/subscriptions","organizations_url":"https://api.github.com/users/jasan-s/orgs","repos_url":"https://api.github.com/users/jasan-s/repos","events_url":"https://api.github.com/users/jasan-s/events{/privacy}","received_events_url":"https://api.github.com/users/jasan-s/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-15T00:38:47Z","updated_at":"2016-11-14T10:05:09Z","closed_at":"2016-11-14T10:05:09Z","body":"Sorry about this newbie question but I'm my routes currently looks like this: \n\n```\nimport React from 'react'\nimport { Router, Route, IndexRoute } from 'react-router'\nimport { MainContainer, HomeContainer, FeedContainer } from 'containers'\nimport {Error404} from 'components'\n\nexport default function getRoutes (checkAuth, history, errorAuth) {\n  return (\n      <Router history={history}>\n        <Route path='/' component={MainContainer}>\n          <IndexRoute component = {HomeContainer} onEnter = {checkAuth}/>\n          <Route path='feed' component = {FeedContainer} onEnter = {checkAuth}/>\n          <Route path='*' component = {Error404} />\n        </Route>\n      </Router>\n  )\n}\n```\n\nwhich i'm using in index.js: \n\n```\nconst App = () => (\n    <MuiThemeProvider>\n      <Provider store = {store}>\n        {getRoutes(checkAuth, history, errorAuth)}\n      </Provider>\n    </MuiThemeProvider>\n    )\n\n   ReactDOM.render(\n      <App/>,\n   document.getElementById('app')\n```\n"},"comment":{"url":"https://api.github.com/repos/ModusCreateOrg/react-dynamic-route-loading-es6/issues/comments/260295165","html_url":"https://github.com/ModusCreateOrg/react-dynamic-route-loading-es6/issues/6#issuecomment-260295165","issue_url":"https://api.github.com/repos/ModusCreateOrg/react-dynamic-route-loading-es6/issues/6","id":260295165,"user":{"login":"grgur","id":733074,"avatar_url":"https://avatars.githubusercontent.com/u/733074?v=3","gravatar_id":"","url":"https://api.github.com/users/grgur","html_url":"https://github.com/grgur","followers_url":"https://api.github.com/users/grgur/followers","following_url":"https://api.github.com/users/grgur/following{/other_user}","gists_url":"https://api.github.com/users/grgur/gists{/gist_id}","starred_url":"https://api.github.com/users/grgur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grgur/subscriptions","organizations_url":"https://api.github.com/users/grgur/orgs","repos_url":"https://api.github.com/users/grgur/repos","events_url":"https://api.github.com/users/grgur/events{/privacy}","received_events_url":"https://api.github.com/users/grgur/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T10:05:09Z","updated_at":"2016-11-14T10:05:09Z","body":"`System.import` or `require.ensure` are the magic APIs that you need to look into. Whatever they require will be automatically split from the core. React router's `getComponent` does the async request for the files that contain those components. \r\nTake a look at this [react router automatic code splitting example](https://github.com/ModusCreateOrg/react-dynamic-route-loading-es6/blob/master/client/pages/routes.js) and the official webpack 2 [migration guide](https://webpack.js.org/how-to/upgrade-from-webpack-1/)"}}
{"actor":{"display_login":"grgur"}}