{"action":"created","issue":{"url":"https://api.github.com/repos/Olical/react-faux-dom/issues/73","repository_url":"https://api.github.com/repos/Olical/react-faux-dom","labels_url":"https://api.github.com/repos/Olical/react-faux-dom/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/Olical/react-faux-dom/issues/73/comments","events_url":"https://api.github.com/repos/Olical/react-faux-dom/issues/73/events","html_url":"https://github.com/Olical/react-faux-dom/pull/73","id":175724309,"number":73,"title":"Generate appended IDs recursively","user":{"login":"philpl","id":2041385,"avatar_url":"https://avatars.githubusercontent.com/u/2041385?v=3","gravatar_id":"","url":"https://api.github.com/users/philpl","html_url":"https://github.com/philpl","followers_url":"https://api.github.com/users/philpl/followers","following_url":"https://api.github.com/users/philpl/following{/other_user}","gists_url":"https://api.github.com/users/philpl/gists{/gist_id}","starred_url":"https://api.github.com/users/philpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philpl/subscriptions","organizations_url":"https://api.github.com/users/philpl/orgs","repos_url":"https://api.github.com/users/philpl/repos","events_url":"https://api.github.com/users/philpl/events{/privacy}","received_events_url":"https://api.github.com/users/philpl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-09-08T10:57:23Z","updated_at":"2016-09-12T19:43:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Olical/react-faux-dom/pulls/73","html_url":"https://github.com/Olical/react-faux-dom/pull/73","diff_url":"https://github.com/Olical/react-faux-dom/pull/73.diff","patch_url":"https://github.com/Olical/react-faux-dom/pull/73.patch"},"body":"Fix #67 \r\n\r\nBefore keys were only unique on a single level.\r\nThus when a tree with two separate groups of children\r\nwere generated, these children could still have the same\r\nkeys.\r\n\r\nThis fix appends the element index to the previous key.\r\n\r\nThere is a remaining problem: When the user has multiple\r\nfaux doms, these doms can still have overlapping ids.\r\n\r\nThis can be circumvented however, by the user\r\npassing his custom key prefix:\r\n\r\n```js\r\nelA.toReact('first-dom')\r\nelB.toReact('second-dom')\r\n```"},"comment":{"url":"https://api.github.com/repos/Olical/react-faux-dom/issues/comments/246467450","html_url":"https://github.com/Olical/react-faux-dom/pull/73#issuecomment-246467450","issue_url":"https://api.github.com/repos/Olical/react-faux-dom/issues/73","id":246467450,"user":{"login":"philpl","id":2041385,"avatar_url":"https://avatars.githubusercontent.com/u/2041385?v=3","gravatar_id":"","url":"https://api.github.com/users/philpl","html_url":"https://github.com/philpl","followers_url":"https://api.github.com/users/philpl/followers","following_url":"https://api.github.com/users/philpl/following{/other_user}","gists_url":"https://api.github.com/users/philpl/gists{/gist_id}","starred_url":"https://api.github.com/users/philpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philpl/subscriptions","organizations_url":"https://api.github.com/users/philpl/orgs","repos_url":"https://api.github.com/users/philpl/repos","events_url":"https://api.github.com/users/philpl/events{/privacy}","received_events_url":"https://api.github.com/users/philpl/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T19:43:30Z","updated_at":"2016-09-12T19:43:30Z","body":"@Olical Yes, it is. But in React you create elements dynamically. They can't have a unique ID that tells React when they've changed, since they're immutable. React would still need to diff.\r\n\r\nBy default React just uses the index, like the user does, which is bad when elements are moving.\r\n\r\nIn this case we have a DOM-like API, where the Element is mutable, so we actually can have unique identifiers."}}
{"actor":{"display_login":"philpl"}}