{"action":"opened","number":714,"pull_request":{"url":"https://api.github.com/repos/facebook/react-devtools/pulls/714","id":120307674,"html_url":"https://github.com/facebook/react-devtools/pull/714","diff_url":"https://github.com/facebook/react-devtools/pull/714.diff","patch_url":"https://github.com/facebook/react-devtools/pull/714.patch","issue_url":"https://api.github.com/repos/facebook/react-devtools/issues/714","number":714,"state":"open","locked":false,"title":"Detect duplicated react","user":{"login":"chisler","id":13795437,"avatar_url":"https://avatars2.githubusercontent.com/u/13795437?v=3","gravatar_id":"","url":"https://api.github.com/users/chisler","html_url":"https://github.com/chisler","followers_url":"https://api.github.com/users/chisler/followers","following_url":"https://api.github.com/users/chisler/following{/other_user}","gists_url":"https://api.github.com/users/chisler/gists{/gist_id}","starred_url":"https://api.github.com/users/chisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chisler/subscriptions","organizations_url":"https://api.github.com/users/chisler/orgs","repos_url":"https://api.github.com/users/chisler/repos","events_url":"https://api.github.com/users/chisler/events{/privacy}","received_events_url":"https://api.github.com/users/chisler/received_events","type":"User","site_admin":false},"body":"Resolves #700.\r\n\r\nMost popular renderers that affect chrome, except [one](https://github.com/toxicFork/react-three-renderer/), do not inject themselves in DevTools hook as I stated in this [comment](https://github.com/facebook/react-devtools/issues/700#issuecomment-300606157).\r\n\r\n**We want to:**\r\nDetect multiple copies of ReactDOM\r\n\r\n**What we do on injection of renderer:**\r\n1. Try to filter out all renderers other than ReactDOM.\r\n2. Count injected renderers.\r\n3. More than 1 => report duplication.\r\n\r\nFiltering relies on specifics of production builds of ReactDOM v15.\\*, v0.14.\\* and v0.13.\\*\r\n\r\n---\r\n\r\nIssues:\r\n1. This filtering is not perfect, it's a way to avoid changing `react-dom`, so if you see a better way, it's cool.\r\n1. Current version of  DevTools overwrites build type reported with each consequent renderer injection. Seems like it's better to report all the builds of renderers to cover \"valid multiple renderers\" case in future.\r\n1. Function [`isReactDOM()`](https://github.com/chisler/react-devtools/blob/detect-duplicated-react/backend/installGlobalHook.js#L144) works similar to [`detectReactBuildType()`](https://github.com/facebook/react-devtools/blob/fae06506c6d9f2397ff602e41dfea9c9e9c54da1/backend/installGlobalHook.js#L23) => mirrors it's need for  higher fault tolerance.\r\n\r\n---\r\n\r\nExamples:\r\n\r\n|  **Detected**  | \r\n**Filtered out**  |\r\n|---|---|\r\n|  ![image](https://cloud.githubusercontent.com/assets/13795437/25996768/9151d542-3721-11e7-8ed5-65e6b98af345.png)  | ![image](https://cloud.githubusercontent.com/assets/13795437/25996745/74ae74e0-3721-11e7-8848-168b43eb7a7a.png)  |\r\n| Website [link](https://www.conciergeauctions.com/) uses two copies of React: from vendors.js and chatlio.min.80ec1f7e.js.   |  Website [link](http://toxicfork.github.io/react-three-renderer-example/#/webgl_geometries) uses two renderers: unminified ReactDOM and unminified  ReactThreeRenderer (which is filtered out) |\r\n| Result: duplicate reported. | Result: unfinified reported. | \r\n\r\n","created_at":"2017-05-12T11:59:10Z","updated_at":"2017-05-12T11:59:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-devtools/pulls/714/commits","review_comments_url":"https://api.github.com/repos/facebook/react-devtools/pulls/714/comments","review_comment_url":"https://api.github.com/repos/facebook/react-devtools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-devtools/issues/714/comments","statuses_url":"https://api.github.com/repos/facebook/react-devtools/statuses/22bb668cea8ffc3b564c84875646f6aa178aca85","head":{"label":"chisler:detect-duplicated-react","ref":"detect-duplicated-react","sha":"22bb668cea8ffc3b564c84875646f6aa178aca85","user":{"login":"chisler","id":13795437,"avatar_url":"https://avatars2.githubusercontent.com/u/13795437?v=3","gravatar_id":"","url":"https://api.github.com/users/chisler","html_url":"https://github.com/chisler","followers_url":"https://api.github.com/users/chisler/followers","following_url":"https://api.github.com/users/chisler/following{/other_user}","gists_url":"https://api.github.com/users/chisler/gists{/gist_id}","starred_url":"https://api.github.com/users/chisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chisler/subscriptions","organizations_url":"https://api.github.com/users/chisler/orgs","repos_url":"https://api.github.com/users/chisler/repos","events_url":"https://api.github.com/users/chisler/events{/privacy}","received_events_url":"https://api.github.com/users/chisler/received_events","type":"User","site_admin":false},"repo":{"id":90762256,"name":"react-devtools","full_name":"chisler/react-devtools","owner":{"login":"chisler","id":13795437,"avatar_url":"https://avatars2.githubusercontent.com/u/13795437?v=3","gravatar_id":"","url":"https://api.github.com/users/chisler","html_url":"https://github.com/chisler","followers_url":"https://api.github.com/users/chisler/followers","following_url":"https://api.github.com/users/chisler/following{/other_user}","gists_url":"https://api.github.com/users/chisler/gists{/gist_id}","starred_url":"https://api.github.com/users/chisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chisler/subscriptions","organizations_url":"https://api.github.com/users/chisler/orgs","repos_url":"https://api.github.com/users/chisler/repos","events_url":"https://api.github.com/users/chisler/events{/privacy}","received_events_url":"https://api.github.com/users/chisler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chisler/react-devtools","description":"An extension that allows inspection of React component hierarchy in Chrome Developer Tools.","fork":true,"url":"https://api.github.com/repos/chisler/react-devtools","forks_url":"https://api.github.com/repos/chisler/react-devtools/forks","keys_url":"https://api.github.com/repos/chisler/react-devtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chisler/react-devtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chisler/react-devtools/teams","hooks_url":"https://api.github.com/repos/chisler/react-devtools/hooks","issue_events_url":"https://api.github.com/repos/chisler/react-devtools/issues/events{/number}","events_url":"https://api.github.com/repos/chisler/react-devtools/events","assignees_url":"https://api.github.com/repos/chisler/react-devtools/assignees{/user}","branches_url":"https://api.github.com/repos/chisler/react-devtools/branches{/branch}","tags_url":"https://api.github.com/repos/chisler/react-devtools/tags","blobs_url":"https://api.github.com/repos/chisler/react-devtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chisler/react-devtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chisler/react-devtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/chisler/react-devtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chisler/react-devtools/statuses/{sha}","languages_url":"https://api.github.com/repos/chisler/react-devtools/languages","stargazers_url":"https://api.github.com/repos/chisler/react-devtools/stargazers","contributors_url":"https://api.github.com/repos/chisler/react-devtools/contributors","subscribers_url":"https://api.github.com/repos/chisler/react-devtools/subscribers","subscription_url":"https://api.github.com/repos/chisler/react-devtools/subscription","commits_url":"https://api.github.com/repos/chisler/react-devtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/chisler/react-devtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/chisler/react-devtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/chisler/react-devtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/chisler/react-devtools/contents/{+path}","compare_url":"https://api.github.com/repos/chisler/react-devtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chisler/react-devtools/merges","archive_url":"https://api.github.com/repos/chisler/react-devtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chisler/react-devtools/downloads","issues_url":"https://api.github.com/repos/chisler/react-devtools/issues{/number}","pulls_url":"https://api.github.com/repos/chisler/react-devtools/pulls{/number}","milestones_url":"https://api.github.com/repos/chisler/react-devtools/milestones{/number}","notifications_url":"https://api.github.com/repos/chisler/react-devtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chisler/react-devtools/labels{/name}","releases_url":"https://api.github.com/repos/chisler/react-devtools/releases{/id}","deployments_url":"https://api.github.com/repos/chisler/react-devtools/deployments","created_at":"2017-05-09T15:28:50Z","updated_at":"2017-05-09T15:28:52Z","pushed_at":"2017-05-12T11:34:05Z","git_url":"git://github.com/chisler/react-devtools.git","ssh_url":"git@github.com:chisler/react-devtools.git","clone_url":"https://github.com/chisler/react-devtools.git","svn_url":"https://github.com/chisler/react-devtools","homepage":"","size":12139,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"facebook:master","ref":"master","sha":"90896c9d63a0cd686cfe5e39bdd5b1652810d8c4","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars0.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":12601374,"name":"react-devtools","full_name":"facebook/react-devtools","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars0.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-devtools","description":"An extension that allows inspection of React component hierarchy in Chrome Developer Tools.","fork":false,"url":"https://api.github.com/repos/facebook/react-devtools","forks_url":"https://api.github.com/repos/facebook/react-devtools/forks","keys_url":"https://api.github.com/repos/facebook/react-devtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-devtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-devtools/teams","hooks_url":"https://api.github.com/repos/facebook/react-devtools/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-devtools/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-devtools/events","assignees_url":"https://api.github.com/repos/facebook/react-devtools/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-devtools/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-devtools/tags","blobs_url":"https://api.github.com/repos/facebook/react-devtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-devtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-devtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-devtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-devtools/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-devtools/languages","stargazers_url":"https://api.github.com/repos/facebook/react-devtools/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-devtools/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-devtools/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-devtools/subscription","commits_url":"https://api.github.com/repos/facebook/react-devtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-devtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-devtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-devtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-devtools/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-devtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-devtools/merges","archive_url":"https://api.github.com/repos/facebook/react-devtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-devtools/downloads","issues_url":"https://api.github.com/repos/facebook/react-devtools/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-devtools/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-devtools/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-devtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-devtools/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-devtools/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react-devtools/deployments","created_at":"2013-09-04T20:28:43Z","updated_at":"2017-05-12T11:11:59Z","pushed_at":"2017-05-12T11:56:32Z","git_url":"git://github.com/facebook/react-devtools.git","ssh_url":"git@github.com:facebook/react-devtools.git","clone_url":"https://github.com/facebook/react-devtools.git","svn_url":"https://github.com/facebook/react-devtools","homepage":"","size":12250,"stargazers_count":4199,"watchers_count":4199,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":525,"mirror_url":null,"open_issues_count":88,"forks":525,"open_issues":88,"watchers":4199,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-devtools/pulls/714"},"html":{"href":"https://github.com/facebook/react-devtools/pull/714"},"issue":{"href":"https://api.github.com/repos/facebook/react-devtools/issues/714"},"comments":{"href":"https://api.github.com/repos/facebook/react-devtools/issues/714/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-devtools/pulls/714/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-devtools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-devtools/pulls/714/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-devtools/statuses/22bb668cea8ffc3b564c84875646f6aa178aca85"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":7,"additions":67,"deletions":2,"changed_files":6}}
{"actor":{"display_login":"chisler"}}