{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/7516","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/7516/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/7516/comments","events_url":"https://api.github.com/repos/facebook/react/issues/7516/events","html_url":"https://github.com/facebook/react/pull/7516","id":171779733,"number":7516,"title":"Test renderer traversal","user":{"login":"spicyj","id":6820,"avatar_url":"https://avatars.githubusercontent.com/u/6820?v=3","gravatar_id":"","url":"https://api.github.com/users/spicyj","html_url":"https://github.com/spicyj","followers_url":"https://api.github.com/users/spicyj/followers","following_url":"https://api.github.com/users/spicyj/following{/other_user}","gists_url":"https://api.github.com/users/spicyj/gists{/gist_id}","starred_url":"https://api.github.com/users/spicyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicyj/subscriptions","organizations_url":"https://api.github.com/users/spicyj/orgs","repos_url":"https://api.github.com/users/spicyj/repos","events_url":"https://api.github.com/users/spicyj/events{/privacy}","received_events_url":"https://api.github.com/users/spicyj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-17T22:53:17Z","updated_at":"2016-08-30T16:35:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/7516","html_url":"https://github.com/facebook/react/pull/7516","diff_url":"https://github.com/facebook/react/pull/7516.diff","patch_url":"https://github.com/facebook/react/pull/7516.patch"},"body":"If you do\n\n```\nx = ReactTestRenderer.create(<a />);\nx.update(<b />);\nx.getType();\n```\n\nthen you probably expect to get `'b'` back. But if you were to do\n\n```\ndiv = ReactTestRenderer.create(<div><a /></div>);\nx = div.getChildren()[0];\ndiv.update(<div><b /></div>);\nx.getType();\n```\n\nthen since `x` points directly to the original `<a />` child, there's no possible way we could return `'b'`. So rather than have a confusing inconsistency between the top-level node and all the lower ones, @gaearon suggested outlawing changing type and key so that you always have the same instance.\n\nI'm not actually sure I like this. It might make more sense to distinguish between the top-level instance and the children in the API -- since it also makes sense to call .update and .unmount at the top but nowhere else.\n\ncc @sebmarkbage @rafeca #7148"},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/243499853","html_url":"https://github.com/facebook/react/pull/7516#issuecomment-243499853","issue_url":"https://api.github.com/repos/facebook/react/issues/7516","id":243499853,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T16:35:15Z","updated_at":"2016-08-30T16:35:15Z","body":"@cpojer @spicyj \r\n\r\nWho plans to use this API?\r\nWho is the right person to review this diff?"}}
{"actor":{"display_login":"gaearon"}}