{"action":"created","comment":{"url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/comments/42944681","id":42944681,"diff_hunk":"@@ -35,24 +36,27 @@ export default (store) => {\n    * Please keep routes in alphabetical order\n    */\n   return (\n-    <Route path=\"/\" component={App}>\n-      { /* Home (main) route */ }\n-      <IndexRoute component={Home}/>\n+    <Router>\n+      <Route path=\"/\" component={RedirectToDefaultLocale} />","path":"src/routes.js","position":23,"original_position":23,"commit_id":"f5728892e1b8699144d0a81d60d379878b60caf8","original_commit_id":"f5728892e1b8699144d0a81d60d379878b60caf8","user":{"login":"andresgutgon","id":49499,"avatar_url":"https://avatars.githubusercontent.com/u/49499?v=3","gravatar_id":"","url":"https://api.github.com/users/andresgutgon","html_url":"https://github.com/andresgutgon","followers_url":"https://api.github.com/users/andresgutgon/followers","following_url":"https://api.github.com/users/andresgutgon/following{/other_user}","gists_url":"https://api.github.com/users/andresgutgon/gists{/gist_id}","starred_url":"https://api.github.com/users/andresgutgon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresgutgon/subscriptions","organizations_url":"https://api.github.com/users/andresgutgon/orgs","repos_url":"https://api.github.com/users/andresgutgon/repos","events_url":"https://api.github.com/users/andresgutgon/events{/privacy}","received_events_url":"https://api.github.com/users/andresgutgon/received_events","type":"User","site_admin":false},"body":"I think `onEnter` is before `component`. And give you the option to redirect before enter on a component. https://github.com/rackt/react-router/blob/f5aa145d465d3d85eb63f80f09029c59b6db1b4a/docs/API.md#onenternextstate-replacestate","created_at":"2015-10-25T13:16:06Z","updated_at":"2015-10-25T13:16:06Z","html_url":"https://github.com/erikras/react-redux-universal-hot-example/pull/361#discussion_r42944681","pull_request_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361","_links":{"self":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/comments/42944681"},"html":{"href":"https://github.com/erikras/react-redux-universal-hot-example/pull/361#discussion_r42944681"},"pull_request":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361"}}},"pull_request":{"url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361","id":47893537,"html_url":"https://github.com/erikras/react-redux-universal-hot-example/pull/361","diff_url":"https://github.com/erikras/react-redux-universal-hot-example/pull/361.diff","patch_url":"https://github.com/erikras/react-redux-universal-hot-example/pull/361.patch","issue_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/issues/361","number":361,"state":"open","locked":false,"title":"added react-intl & locale routing & locale switcher","user":{"login":"hank7444","id":4727090,"avatar_url":"https://avatars.githubusercontent.com/u/4727090?v=3","gravatar_id":"","url":"https://api.github.com/users/hank7444","html_url":"https://github.com/hank7444","followers_url":"https://api.github.com/users/hank7444/followers","following_url":"https://api.github.com/users/hank7444/following{/other_user}","gists_url":"https://api.github.com/users/hank7444/gists{/gist_id}","starred_url":"https://api.github.com/users/hank7444/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hank7444/subscriptions","organizations_url":"https://api.github.com/users/hank7444/orgs","repos_url":"https://api.github.com/users/hank7444/repos","events_url":"https://api.github.com/users/hank7444/events{/privacy}","received_events_url":"https://api.github.com/users/hank7444/received_events","type":"User","site_admin":false},"body":"I use react-intl to implement i18n feature, the features as follews\r\n\r\n### 1.  locale-routing\r\n\r\nthe router will auto replaceState, such as:\r\n\r\n```\r\n/  ->  /{defaultLocale}\r\n\r\nex:\r\n/ -> /en\r\n```\r\n\r\n```\r\n/{notExistLocale} -> /{defaultLocale}/{notExistLocale}  \r\n\r\nex:\r\n/aaa/  -> /en/aaa\r\n```\r\n\r\nyou can select locale on localeSwitcher,  or change URL  locale param directly,\r\nthe currentLocate will save on cookie. If the URL doesn't have locale param, it will get currentLocale from cookie.\r\n\r\n\r\n## Nav locale example\r\n\r\n### en\r\n![image](https://cloud.githubusercontent.com/assets/4727090/10539289/10d1d6d8-7431-11e5-8374-9100184f9877.png)\r\n\r\n### french\r\n![image](https://cloud.githubusercontent.com/assets/4727090/10539365/a4e9b6a6-7431-11e5-8342-9fe90ddfc222.png)\r\n\r\n\r\n## react-intl example\r\n\r\nI also put react-intl examples on InfoBar Component, for examples:\r\n\r\n### en\r\n![image](https://cloud.githubusercontent.com/assets/4727090/10539398/e92ae394-7431-11e5-8ef2-64694c4ccf98.png)\r\n\r\n\r\n### french\r\n![image](https://cloud.githubusercontent.com/assets/4727090/10539379/c62596b4-7431-11e5-92fd-ecffebd89669.png)\r\n\r\n\r\n## exist issues\r\n\r\nserver side using module `intl' but cilent side using module `react-intl` (I guess..), so it always give me warning, have somebody a good idea?\r\n\r\n```\r\nWarning: React attempted to reuse markup in a container but the checksum was invalid. \r\nThis generally means that you are using server rendering and the markup generated \r\non the server was not what the client was expecting. \r\nReact injected new markup to compensate which works \r\nbut you have lost many of the benefits of server rendering. Instead, \r\nfigure out why the markup being generated is different on the client or server:\r\n\r\n```\r\n\r\n\r\n\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4727090/10539458/46ee345e-7432-11e5-9a5c-fd4284cbb99a.png)\r\n\r\n\r\n\r\n\r\n","created_at":"2015-10-16T10:21:43Z","updated_at":"2015-10-25T13:16:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de8c711cd5d7aaf43de838967fc564a4abf4157a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361/commits","review_comments_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361/comments","review_comment_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/issues/361/comments","statuses_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/statuses/f5728892e1b8699144d0a81d60d379878b60caf8","head":{"label":"hank7444:feature/add_react_intl","ref":"feature/add_react_intl","sha":"f5728892e1b8699144d0a81d60d379878b60caf8","user":{"login":"hank7444","id":4727090,"avatar_url":"https://avatars.githubusercontent.com/u/4727090?v=3","gravatar_id":"","url":"https://api.github.com/users/hank7444","html_url":"https://github.com/hank7444","followers_url":"https://api.github.com/users/hank7444/followers","following_url":"https://api.github.com/users/hank7444/following{/other_user}","gists_url":"https://api.github.com/users/hank7444/gists{/gist_id}","starred_url":"https://api.github.com/users/hank7444/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hank7444/subscriptions","organizations_url":"https://api.github.com/users/hank7444/orgs","repos_url":"https://api.github.com/users/hank7444/repos","events_url":"https://api.github.com/users/hank7444/events{/privacy}","received_events_url":"https://api.github.com/users/hank7444/received_events","type":"User","site_admin":false},"repo":{"id":42230434,"name":"react-redux-universal-hot-example","full_name":"hank7444/react-redux-universal-hot-example","owner":{"login":"hank7444","id":4727090,"avatar_url":"https://avatars.githubusercontent.com/u/4727090?v=3","gravatar_id":"","url":"https://api.github.com/users/hank7444","html_url":"https://github.com/hank7444","followers_url":"https://api.github.com/users/hank7444/followers","following_url":"https://api.github.com/users/hank7444/following{/other_user}","gists_url":"https://api.github.com/users/hank7444/gists{/gist_id}","starred_url":"https://api.github.com/users/hank7444/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hank7444/subscriptions","organizations_url":"https://api.github.com/users/hank7444/orgs","repos_url":"https://api.github.com/users/hank7444/repos","events_url":"https://api.github.com/users/hank7444/events{/privacy}","received_events_url":"https://api.github.com/users/hank7444/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hank7444/react-redux-universal-hot-example","description":"A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-hot-loader","fork":true,"url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example","forks_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/forks","keys_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/teams","hooks_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/hooks","issue_events_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/issues/events{/number}","events_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/events","assignees_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/assignees{/user}","branches_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/branches{/branch}","tags_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/tags","blobs_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/git/refs{/sha}","trees_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/statuses/{sha}","languages_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/languages","stargazers_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/stargazers","contributors_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/contributors","subscribers_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/subscribers","subscription_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/subscription","commits_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/commits{/sha}","git_commits_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/git/commits{/sha}","comments_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/comments{/number}","issue_comment_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/issues/comments{/number}","contents_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/contents/{+path}","compare_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/merges","archive_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/downloads","issues_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/issues{/number}","pulls_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/pulls{/number}","milestones_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/milestones{/number}","notifications_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/labels{/name}","releases_url":"https://api.github.com/repos/hank7444/react-redux-universal-hot-example/releases{/id}","created_at":"2015-09-10T07:52:16Z","updated_at":"2015-09-10T07:52:16Z","pushed_at":"2015-10-21T02:34:49Z","git_url":"git://github.com/hank7444/react-redux-universal-hot-example.git","ssh_url":"git@github.com:hank7444/react-redux-universal-hot-example.git","clone_url":"https://github.com/hank7444/react-redux-universal-hot-example.git","svn_url":"https://github.com/hank7444/react-redux-universal-hot-example","homepage":null,"size":4157,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"erikras:master","ref":"master","sha":"4a3e628fbd38180c7f688f0cbaa4e207245b6d9f","user":{"login":"erikras","id":4396759,"avatar_url":"https://avatars.githubusercontent.com/u/4396759?v=3","gravatar_id":"","url":"https://api.github.com/users/erikras","html_url":"https://github.com/erikras","followers_url":"https://api.github.com/users/erikras/followers","following_url":"https://api.github.com/users/erikras/following{/other_user}","gists_url":"https://api.github.com/users/erikras/gists{/gist_id}","starred_url":"https://api.github.com/users/erikras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikras/subscriptions","organizations_url":"https://api.github.com/users/erikras/orgs","repos_url":"https://api.github.com/users/erikras/repos","events_url":"https://api.github.com/users/erikras/events{/privacy}","received_events_url":"https://api.github.com/users/erikras/received_events","type":"User","site_admin":false},"repo":{"id":37931301,"name":"react-redux-universal-hot-example","full_name":"erikras/react-redux-universal-hot-example","owner":{"login":"erikras","id":4396759,"avatar_url":"https://avatars.githubusercontent.com/u/4396759?v=3","gravatar_id":"","url":"https://api.github.com/users/erikras","html_url":"https://github.com/erikras","followers_url":"https://api.github.com/users/erikras/followers","following_url":"https://api.github.com/users/erikras/following{/other_user}","gists_url":"https://api.github.com/users/erikras/gists{/gist_id}","starred_url":"https://api.github.com/users/erikras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikras/subscriptions","organizations_url":"https://api.github.com/users/erikras/orgs","repos_url":"https://api.github.com/users/erikras/repos","events_url":"https://api.github.com/users/erikras/events{/privacy}","received_events_url":"https://api.github.com/users/erikras/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erikras/react-redux-universal-hot-example","description":"A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform","fork":false,"url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example","forks_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/forks","keys_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/teams","hooks_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/hooks","issue_events_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/issues/events{/number}","events_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/events","assignees_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/assignees{/user}","branches_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/branches{/branch}","tags_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/tags","blobs_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/git/refs{/sha}","trees_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/statuses/{sha}","languages_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/languages","stargazers_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/stargazers","contributors_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/contributors","subscribers_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/subscribers","subscription_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/subscription","commits_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/commits{/sha}","git_commits_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/git/commits{/sha}","comments_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/comments{/number}","issue_comment_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/issues/comments{/number}","contents_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/contents/{+path}","compare_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/merges","archive_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/downloads","issues_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/issues{/number}","pulls_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls{/number}","milestones_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/milestones{/number}","notifications_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/labels{/name}","releases_url":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/releases{/id}","created_at":"2015-06-23T16:39:21Z","updated_at":"2015-10-25T08:20:41Z","pushed_at":"2015-10-25T03:28:56Z","git_url":"git://github.com/erikras/react-redux-universal-hot-example.git","ssh_url":"git@github.com:erikras/react-redux-universal-hot-example.git","clone_url":"https://github.com/erikras/react-redux-universal-hot-example.git","svn_url":"https://github.com/erikras/react-redux-universal-hot-example","homepage":"","size":6659,"stargazers_count":1594,"watchers_count":1594,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":315,"mirror_url":null,"open_issues_count":32,"forks":315,"open_issues":32,"watchers":1594,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361"},"html":{"href":"https://github.com/erikras/react-redux-universal-hot-example/pull/361"},"issue":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/issues/361"},"comments":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/issues/361/comments"},"review_comments":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361/comments"},"review_comment":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/pulls/361/commits"},"statuses":{"href":"https://api.github.com/repos/erikras/react-redux-universal-hot-example/statuses/f5728892e1b8699144d0a81d60d379878b60caf8"}}}}