{"action":"created","issue":{"url":"https://api.github.com/repos/developit/preact/issues/297","repository_url":"https://api.github.com/repos/developit/preact","labels_url":"https://api.github.com/repos/developit/preact/issues/297/labels{/name}","comments_url":"https://api.github.com/repos/developit/preact/issues/297/comments","events_url":"https://api.github.com/repos/developit/preact/issues/297/events","html_url":"https://github.com/developit/preact/issues/297","id":175908341,"number":297,"title":"DOMException when navigating with react-router","user":{"login":"yanni4night","id":1710436,"avatar_url":"https://avatars.githubusercontent.com/u/1710436?v=3","gravatar_id":"","url":"https://api.github.com/users/yanni4night","html_url":"https://github.com/yanni4night","followers_url":"https://api.github.com/users/yanni4night/followers","following_url":"https://api.github.com/users/yanni4night/following{/other_user}","gists_url":"https://api.github.com/users/yanni4night/gists{/gist_id}","starred_url":"https://api.github.com/users/yanni4night/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanni4night/subscriptions","organizations_url":"https://api.github.com/users/yanni4night/orgs","repos_url":"https://api.github.com/users/yanni4night/repos","events_url":"https://api.github.com/users/yanni4night/events{/privacy}","received_events_url":"https://api.github.com/users/yanni4night/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/developit/preact/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/developit/preact/labels/has%20fix","name":"has fix","color":"c2e0c6"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-09T01:56:11Z","updated_at":"2016-09-13T03:07:55Z","closed_at":null,"body":"I don't know what's wrong with it, so the replication may be a little complicated, please be patient.\r\n\r\nI am trying to use `redux`,`react-redux`,`react-router`, `react-router-redux` as well as `preact` instead of `react` to build an APP. As I read the doc, `preact-compat` makes preact as same as react mostly.\r\n\r\nI found in some cases, *dom-diff* algorithm may crash. Please navigate to <https://bitbucket.org/yanni4night/preact-issue-297> and follow README to replicate the issue. In brief, when I pressed the \"go back\" button of browser:\r\n\r\n![687474703a2f2f7777312e73696e61696d672e636e2f6c617267652f38303162373830616a773166376e346c6b3974746f6a323164733063717136362e6a7067](https://cloud.githubusercontent.com/assets/1710436/18373872/74928e14-767a-11e6-83e9-aec3022cc425.jpeg)\r\n\r\nI guess the definition of routers may be the key:\r\n\r\n```jsx\r\nrender((\r\n<Provider store={store}>\r\n      <Router history={history}>\r\n          <Route path=\"/\" component={ContainerPage}>\r\n            <IndexRoute component={LatestPage}/>\r\n            <Route path=\"latest\" component={LatestPage}/>\r\n            <Route path=\"hot\" component={HotPage}/>\r\n          </Route>\r\n          <Route path=\"/topic/:topic_id\" component={TopicPage}></Route>\r\n      </Router>\r\n</Provider>\r\n), document.querySelector('#preact-root'));\r\n```\r\n\r\nIf I move the last router, everything is OK:\r\n\r\n```jsx\r\nrender((\r\n<Provider store={store}>\r\n      <Router history={history}>\r\n          <Route path=\"/\" component={ContainerPage}>\r\n            <IndexRoute component={LatestPage}/>\r\n            <Route path=\"latest\" component={LatestPage}/>\r\n            <Route path=\"hot\" component={HotPage}/>\r\n            <Route path=\"/topic/:topic_id\" component={TopicPage}></Route>\r\n          </Route>\r\n      </Router>\r\n</Provider>\r\n), document.querySelector('#preact-root'));\r\n```\r\n\r\nSo, how could I avoid this issue?\r\n\r\n**BTW, react works fine.**"},"comment":{"url":"https://api.github.com/repos/developit/preact/issues/comments/246560630","html_url":"https://github.com/developit/preact/issues/297#issuecomment-246560630","issue_url":"https://api.github.com/repos/developit/preact/issues/297","id":246560630,"user":{"login":"maxguzenski","id":6819,"avatar_url":"https://avatars.githubusercontent.com/u/6819?v=3","gravatar_id":"","url":"https://api.github.com/users/maxguzenski","html_url":"https://github.com/maxguzenski","followers_url":"https://api.github.com/users/maxguzenski/followers","following_url":"https://api.github.com/users/maxguzenski/following{/other_user}","gists_url":"https://api.github.com/users/maxguzenski/gists{/gist_id}","starred_url":"https://api.github.com/users/maxguzenski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxguzenski/subscriptions","organizations_url":"https://api.github.com/users/maxguzenski/orgs","repos_url":"https://api.github.com/users/maxguzenski/repos","events_url":"https://api.github.com/users/maxguzenski/events{/privacy}","received_events_url":"https://api.github.com/users/maxguzenski/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T03:07:55Z","updated_at":"2016-09-13T03:07:55Z","body":"For me, put a \"div\" around Provider or/and Router doesn't work... "}}
{"actor":{"display_login":"maxguzenski"}}