{"action":"created","issue":{"url":"https://api.github.com/repos/developit/preact/issues/339","repository_url":"https://api.github.com/repos/developit/preact","labels_url":"https://api.github.com/repos/developit/preact/issues/339/labels{/name}","comments_url":"https://api.github.com/repos/developit/preact/issues/339/comments","events_url":"https://api.github.com/repos/developit/preact/issues/339/events","html_url":"https://github.com/developit/preact/pull/339","id":180487945,"number":339,"title":"Add React Developer Tools integration","user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-02T00:32:42Z","updated_at":"2016-10-10T20:30:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/developit/preact/pulls/339","html_url":"https://github.com/developit/preact/pull/339","diff_url":"https://github.com/developit/preact/pull/339.diff","patch_url":"https://github.com/developit/preact/pull/339.patch"},"body":"This PR adds a module which provides support for using Preact with the React Developer Tools by emulating the renderer interface that React DOM exposes to the developer tools via `__REACT_DEVTOOLS_GLOBAL_HOOK__.inject(...)`\r\n\r\nI have done a moderate amount of testing with the Chrome extension and the `preact-www` project, along with a few others. It could use additional testing with more complex projects.\r\n\r\nEnabling the devtools integration is currently done by invoking the `initDevTools()` function:\r\n\r\n```js\r\nimport { initDevTools } from 'preact';\r\n\r\n...\r\n\r\n// Call this before first render() call\r\ninitDevTools();\r\n```\r\n\r\n![preact-devtools-2](https://cloud.githubusercontent.com/assets/2458/19017757/f07671ec-883d-11e6-80ad-be115627e305.png)\r\n\r\nFixes #320\r\n\r\nThe implementation is in a separate module and only a few small hooks needed to be added to the Preact core, but the functionality is not yet exposed as a separate entry point. I could use a couple of pointers on how best to do that.\r\n"},"comment":{"url":"https://api.github.com/repos/developit/preact/issues/comments/252737638","html_url":"https://github.com/developit/preact/pull/339#issuecomment-252737638","issue_url":"https://api.github.com/repos/developit/preact/issues/339","id":252737638,"user":{"login":"developit","id":105127,"avatar_url":"https://avatars.githubusercontent.com/u/105127?v=3","gravatar_id":"","url":"https://api.github.com/users/developit","html_url":"https://github.com/developit","followers_url":"https://api.github.com/users/developit/followers","following_url":"https://api.github.com/users/developit/following{/other_user}","gists_url":"https://api.github.com/users/developit/gists{/gist_id}","starred_url":"https://api.github.com/users/developit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developit/subscriptions","organizations_url":"https://api.github.com/users/developit/orgs","repos_url":"https://api.github.com/users/developit/repos","events_url":"https://api.github.com/users/developit/events{/privacy}","received_events_url":"https://api.github.com/users/developit/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T20:30:52Z","updated_at":"2016-10-10T20:30:52Z","body":"Awesome, that much less of a hit than I thought we'd be taking!"}}
{"actor":{"display_login":"developit"}}