{"action":"created","comment":{"url":"https://api.github.com/repos/sortable/react/pulls/comments/155524143","pull_request_review_id":81851167,"id":155524143,"diff_hunk":"@@ -0,0 +1,31 @@\n+import * as adsManager from '@sortable/ads';\n+import * as React from 'react';\n+\n+export interface AdProps {\n+  id: string;\n+}\n+\n+export default class Ad extends React.Component<AdProps, any> {\n+  public componentDidMount() {\n+    adsManager.requestAds([this.props.id]);\n+  }\n+\n+  public shouldComponentUpdate(nextProps: AdProps) {\n+    return this.props.id !== nextProps.id;\n+  }\n+\n+  public componentDidUpdate(prevProps: AdProps) {\n+    if (this.props.id !== prevProps.id) {\n+      adsManager.destroyAds([prevProps.id]);\n+      adsManager.requestAds([this.props.id]);\n+    }\n+  }\n+\n+  public componentWillUnmount() {\n+    adsManager.destroyAds([this.props.id]);\n+  }\n+\n+  public render() {\n+    return React.createElement('div', { id: this.props.id });","path":"src/index.ts","position":29,"original_position":29,"commit_id":"d147cd5eff80a21467a3dc22717928b2402a09d7","original_commit_id":"d147cd5eff80a21467a3dc22717928b2402a09d7","user":{"login":"bgahagan","id":1173561,"avatar_url":"https://avatars1.githubusercontent.com/u/1173561?v=4","gravatar_id":"","url":"https://api.github.com/users/bgahagan","html_url":"https://github.com/bgahagan","followers_url":"https://api.github.com/users/bgahagan/followers","following_url":"https://api.github.com/users/bgahagan/following{/other_user}","gists_url":"https://api.github.com/users/bgahagan/gists{/gist_id}","starred_url":"https://api.github.com/users/bgahagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgahagan/subscriptions","organizations_url":"https://api.github.com/users/bgahagan/orgs","repos_url":"https://api.github.com/users/bgahagan/repos","events_url":"https://api.github.com/users/bgahagan/events{/privacy}","received_events_url":"https://api.github.com/users/bgahagan/received_events","type":"User","site_admin":false},"body":"If I created the component like `<Ad id=\"1\" class=\"react-ad\">`, would the class attribute remain on the rendered div?","created_at":"2017-12-07T13:47:57Z","updated_at":"2017-12-07T13:49:27Z","html_url":"https://github.com/sortable/react/pull/1#discussion_r155524143","pull_request_url":"https://api.github.com/repos/sortable/react/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/sortable/react/pulls/comments/155524143"},"html":{"href":"https://github.com/sortable/react/pull/1#discussion_r155524143"},"pull_request":{"href":"https://api.github.com/repos/sortable/react/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sortable/react/pulls/1","id":156877659,"html_url":"https://github.com/sortable/react/pull/1","diff_url":"https://github.com/sortable/react/pull/1.diff","patch_url":"https://github.com/sortable/react/pull/1.patch","issue_url":"https://api.github.com/repos/sortable/react/issues/1","number":1,"state":"open","locked":false,"title":"Init","user":{"login":"gyson","id":4263515,"avatar_url":"https://avatars3.githubusercontent.com/u/4263515?v=4","gravatar_id":"","url":"https://api.github.com/users/gyson","html_url":"https://github.com/gyson","followers_url":"https://api.github.com/users/gyson/followers","following_url":"https://api.github.com/users/gyson/following{/other_user}","gists_url":"https://api.github.com/users/gyson/gists{/gist_id}","starred_url":"https://api.github.com/users/gyson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyson/subscriptions","organizations_url":"https://api.github.com/users/gyson/orgs","repos_url":"https://api.github.com/users/gyson/repos","events_url":"https://api.github.com/users/gyson/events{/privacy}","received_events_url":"https://api.github.com/users/gyson/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-07T00:44:22Z","updated_at":"2017-12-07T13:49:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91e450f4cb926885704cec33638709f714f5ed9e","assignee":{"login":"bgahagan","id":1173561,"avatar_url":"https://avatars1.githubusercontent.com/u/1173561?v=4","gravatar_id":"","url":"https://api.github.com/users/bgahagan","html_url":"https://github.com/bgahagan","followers_url":"https://api.github.com/users/bgahagan/followers","following_url":"https://api.github.com/users/bgahagan/following{/other_user}","gists_url":"https://api.github.com/users/bgahagan/gists{/gist_id}","starred_url":"https://api.github.com/users/bgahagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgahagan/subscriptions","organizations_url":"https://api.github.com/users/bgahagan/orgs","repos_url":"https://api.github.com/users/bgahagan/repos","events_url":"https://api.github.com/users/bgahagan/events{/privacy}","received_events_url":"https://api.github.com/users/bgahagan/received_events","type":"User","site_admin":false},"assignees":[{"login":"bgahagan","id":1173561,"avatar_url":"https://avatars1.githubusercontent.com/u/1173561?v=4","gravatar_id":"","url":"https://api.github.com/users/bgahagan","html_url":"https://github.com/bgahagan","followers_url":"https://api.github.com/users/bgahagan/followers","following_url":"https://api.github.com/users/bgahagan/following{/other_user}","gists_url":"https://api.github.com/users/bgahagan/gists{/gist_id}","starred_url":"https://api.github.com/users/bgahagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgahagan/subscriptions","organizations_url":"https://api.github.com/users/bgahagan/orgs","repos_url":"https://api.github.com/users/bgahagan/repos","events_url":"https://api.github.com/users/bgahagan/events{/privacy}","received_events_url":"https://api.github.com/users/bgahagan/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/sortable/react/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sortable/react/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sortable/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sortable/react/issues/1/comments","statuses_url":"https://api.github.com/repos/sortable/react/statuses/d147cd5eff80a21467a3dc22717928b2402a09d7","head":{"label":"sortable:init-implementation","ref":"init-implementation","sha":"d147cd5eff80a21467a3dc22717928b2402a09d7","user":{"login":"sortable","id":1587646,"avatar_url":"https://avatars2.githubusercontent.com/u/1587646?v=4","gravatar_id":"","url":"https://api.github.com/users/sortable","html_url":"https://github.com/sortable","followers_url":"https://api.github.com/users/sortable/followers","following_url":"https://api.github.com/users/sortable/following{/other_user}","gists_url":"https://api.github.com/users/sortable/gists{/gist_id}","starred_url":"https://api.github.com/users/sortable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sortable/subscriptions","organizations_url":"https://api.github.com/users/sortable/orgs","repos_url":"https://api.github.com/users/sortable/repos","events_url":"https://api.github.com/users/sortable/events{/privacy}","received_events_url":"https://api.github.com/users/sortable/received_events","type":"Organization","site_admin":false},"repo":{"id":113235596,"name":"react","full_name":"sortable/react","owner":{"login":"sortable","id":1587646,"avatar_url":"https://avatars2.githubusercontent.com/u/1587646?v=4","gravatar_id":"","url":"https://api.github.com/users/sortable","html_url":"https://github.com/sortable","followers_url":"https://api.github.com/users/sortable/followers","following_url":"https://api.github.com/users/sortable/following{/other_user}","gists_url":"https://api.github.com/users/sortable/gists{/gist_id}","starred_url":"https://api.github.com/users/sortable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sortable/subscriptions","organizations_url":"https://api.github.com/users/sortable/orgs","repos_url":"https://api.github.com/users/sortable/repos","events_url":"https://api.github.com/users/sortable/events{/privacy}","received_events_url":"https://api.github.com/users/sortable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sortable/react","description":null,"fork":false,"url":"https://api.github.com/repos/sortable/react","forks_url":"https://api.github.com/repos/sortable/react/forks","keys_url":"https://api.github.com/repos/sortable/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sortable/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sortable/react/teams","hooks_url":"https://api.github.com/repos/sortable/react/hooks","issue_events_url":"https://api.github.com/repos/sortable/react/issues/events{/number}","events_url":"https://api.github.com/repos/sortable/react/events","assignees_url":"https://api.github.com/repos/sortable/react/assignees{/user}","branches_url":"https://api.github.com/repos/sortable/react/branches{/branch}","tags_url":"https://api.github.com/repos/sortable/react/tags","blobs_url":"https://api.github.com/repos/sortable/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sortable/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sortable/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/sortable/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sortable/react/statuses/{sha}","languages_url":"https://api.github.com/repos/sortable/react/languages","stargazers_url":"https://api.github.com/repos/sortable/react/stargazers","contributors_url":"https://api.github.com/repos/sortable/react/contributors","subscribers_url":"https://api.github.com/repos/sortable/react/subscribers","subscription_url":"https://api.github.com/repos/sortable/react/subscription","commits_url":"https://api.github.com/repos/sortable/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/sortable/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/sortable/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/sortable/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/sortable/react/contents/{+path}","compare_url":"https://api.github.com/repos/sortable/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sortable/react/merges","archive_url":"https://api.github.com/repos/sortable/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sortable/react/downloads","issues_url":"https://api.github.com/repos/sortable/react/issues{/number}","pulls_url":"https://api.github.com/repos/sortable/react/pulls{/number}","milestones_url":"https://api.github.com/repos/sortable/react/milestones{/number}","notifications_url":"https://api.github.com/repos/sortable/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sortable/react/labels{/name}","releases_url":"https://api.github.com/repos/sortable/react/releases{/id}","deployments_url":"https://api.github.com/repos/sortable/react/deployments","created_at":"2017-12-05T21:36:07Z","updated_at":"2017-12-05T21:36:07Z","pushed_at":"2017-12-07T00:44:23Z","git_url":"git://github.com/sortable/react.git","ssh_url":"git@github.com:sortable/react.git","clone_url":"https://github.com/sortable/react.git","svn_url":"https://github.com/sortable/react","homepage":null,"size":4,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sortable:master","ref":"master","sha":"2724172a7a16a53f69bb791e6e71fcfce3dbeaa6","user":{"login":"sortable","id":1587646,"avatar_url":"https://avatars2.githubusercontent.com/u/1587646?v=4","gravatar_id":"","url":"https://api.github.com/users/sortable","html_url":"https://github.com/sortable","followers_url":"https://api.github.com/users/sortable/followers","following_url":"https://api.github.com/users/sortable/following{/other_user}","gists_url":"https://api.github.com/users/sortable/gists{/gist_id}","starred_url":"https://api.github.com/users/sortable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sortable/subscriptions","organizations_url":"https://api.github.com/users/sortable/orgs","repos_url":"https://api.github.com/users/sortable/repos","events_url":"https://api.github.com/users/sortable/events{/privacy}","received_events_url":"https://api.github.com/users/sortable/received_events","type":"Organization","site_admin":false},"repo":{"id":113235596,"name":"react","full_name":"sortable/react","owner":{"login":"sortable","id":1587646,"avatar_url":"https://avatars2.githubusercontent.com/u/1587646?v=4","gravatar_id":"","url":"https://api.github.com/users/sortable","html_url":"https://github.com/sortable","followers_url":"https://api.github.com/users/sortable/followers","following_url":"https://api.github.com/users/sortable/following{/other_user}","gists_url":"https://api.github.com/users/sortable/gists{/gist_id}","starred_url":"https://api.github.com/users/sortable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sortable/subscriptions","organizations_url":"https://api.github.com/users/sortable/orgs","repos_url":"https://api.github.com/users/sortable/repos","events_url":"https://api.github.com/users/sortable/events{/privacy}","received_events_url":"https://api.github.com/users/sortable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sortable/react","description":null,"fork":false,"url":"https://api.github.com/repos/sortable/react","forks_url":"https://api.github.com/repos/sortable/react/forks","keys_url":"https://api.github.com/repos/sortable/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sortable/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sortable/react/teams","hooks_url":"https://api.github.com/repos/sortable/react/hooks","issue_events_url":"https://api.github.com/repos/sortable/react/issues/events{/number}","events_url":"https://api.github.com/repos/sortable/react/events","assignees_url":"https://api.github.com/repos/sortable/react/assignees{/user}","branches_url":"https://api.github.com/repos/sortable/react/branches{/branch}","tags_url":"https://api.github.com/repos/sortable/react/tags","blobs_url":"https://api.github.com/repos/sortable/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sortable/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sortable/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/sortable/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sortable/react/statuses/{sha}","languages_url":"https://api.github.com/repos/sortable/react/languages","stargazers_url":"https://api.github.com/repos/sortable/react/stargazers","contributors_url":"https://api.github.com/repos/sortable/react/contributors","subscribers_url":"https://api.github.com/repos/sortable/react/subscribers","subscription_url":"https://api.github.com/repos/sortable/react/subscription","commits_url":"https://api.github.com/repos/sortable/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/sortable/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/sortable/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/sortable/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/sortable/react/contents/{+path}","compare_url":"https://api.github.com/repos/sortable/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sortable/react/merges","archive_url":"https://api.github.com/repos/sortable/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sortable/react/downloads","issues_url":"https://api.github.com/repos/sortable/react/issues{/number}","pulls_url":"https://api.github.com/repos/sortable/react/pulls{/number}","milestones_url":"https://api.github.com/repos/sortable/react/milestones{/number}","notifications_url":"https://api.github.com/repos/sortable/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sortable/react/labels{/name}","releases_url":"https://api.github.com/repos/sortable/react/releases{/id}","deployments_url":"https://api.github.com/repos/sortable/react/deployments","created_at":"2017-12-05T21:36:07Z","updated_at":"2017-12-05T21:36:07Z","pushed_at":"2017-12-07T00:44:23Z","git_url":"git://github.com/sortable/react.git","ssh_url":"git@github.com:sortable/react.git","clone_url":"https://github.com/sortable/react.git","svn_url":"https://github.com/sortable/react","homepage":null,"size":4,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sortable/react/pulls/1"},"html":{"href":"https://github.com/sortable/react/pull/1"},"issue":{"href":"https://api.github.com/repos/sortable/react/issues/1"},"comments":{"href":"https://api.github.com/repos/sortable/react/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sortable/react/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sortable/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sortable/react/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sortable/react/statuses/d147cd5eff80a21467a3dc22717928b2402a09d7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bgahagan"}}