{"action":"created","comment":{"url":"https://api.github.com/repos/rackt/react-redux/pulls/comments/41680975","id":41680975,"diff_hunk":"@@ -77,6 +77,8 @@ export default function createConnect(React) {\n     }\n \n     return function wrapWithConnect(WrappedComponent) {\n+      let isStateless = !(WrappedComponent.prototype && WrappedComponent.prototype.isReactComponent) || !('prototype' in WrappedComponent);","path":"src/components/createConnect.js","position":4,"original_position":4,"commit_id":"ba23c7ea77bccdc334619459689eac74468c7857","original_commit_id":"ba23c7ea77bccdc334619459689eac74468c7857","user":{"login":"lukewestby","id":1508245,"avatar_url":"https://avatars.githubusercontent.com/u/1508245?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewestby","html_url":"https://github.com/lukewestby","followers_url":"https://api.github.com/users/lukewestby/followers","following_url":"https://api.github.com/users/lukewestby/following{/other_user}","gists_url":"https://api.github.com/users/lukewestby/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewestby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewestby/subscriptions","organizations_url":"https://api.github.com/users/lukewestby/orgs","repos_url":"https://api.github.com/users/lukewestby/repos","events_url":"https://api.github.com/users/lukewestby/events{/privacy}","received_events_url":"https://api.github.com/users/lukewestby/received_events","type":"User","site_admin":false},"body":"Sounds good, thanks @gaearon ","created_at":"2015-10-09T21:40:11Z","updated_at":"2015-10-09T21:40:11Z","html_url":"https://github.com/rackt/react-redux/pull/143#discussion_r41680975","pull_request_url":"https://api.github.com/repos/rackt/react-redux/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/rackt/react-redux/pulls/comments/41680975"},"html":{"href":"https://github.com/rackt/react-redux/pull/143#discussion_r41680975"},"pull_request":{"href":"https://api.github.com/repos/rackt/react-redux/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/rackt/react-redux/pulls/143","id":47191588,"html_url":"https://github.com/rackt/react-redux/pull/143","diff_url":"https://github.com/rackt/react-redux/pull/143.diff","patch_url":"https://github.com/rackt/react-redux/pull/143.patch","issue_url":"https://api.github.com/repos/rackt/react-redux/issues/143","number":143,"state":"open","locked":false,"title":"connect doesn't apply ref to stateless component","user":{"login":"bspaulding","id":6833,"avatar_url":"https://avatars.githubusercontent.com/u/6833?v=3","gravatar_id":"","url":"https://api.github.com/users/bspaulding","html_url":"https://github.com/bspaulding","followers_url":"https://api.github.com/users/bspaulding/followers","following_url":"https://api.github.com/users/bspaulding/following{/other_user}","gists_url":"https://api.github.com/users/bspaulding/gists{/gist_id}","starred_url":"https://api.github.com/users/bspaulding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bspaulding/subscriptions","organizations_url":"https://api.github.com/users/bspaulding/orgs","repos_url":"https://api.github.com/users/bspaulding/repos","events_url":"https://api.github.com/users/bspaulding/events{/privacy}","received_events_url":"https://api.github.com/users/bspaulding/received_events","type":"User","site_admin":false},"body":"Took a stab at #141 \r\n\r\nProbably would be better to create the render function beforehand, instead of hitting that conditional every render. Just getting this out there for discussion.\r\n\r\nWorth noting that the detection isn't perfect, but solves the case mentioned here, and keeps the current test for wrappedInstance ref passing. We'd have to instantiate the component to know for sure, but this might be good enough.\r\n\r\nPretty much stole the check from ReactCompositeComponent","created_at":"2015-10-08T18:53:25Z","updated_at":"2015-10-09T21:40:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a97c918f69a8f288c5c626a9c3da0d4de57c626","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackt/react-redux/pulls/143/commits","review_comments_url":"https://api.github.com/repos/rackt/react-redux/pulls/143/comments","review_comment_url":"https://api.github.com/repos/rackt/react-redux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackt/react-redux/issues/143/comments","statuses_url":"https://api.github.com/repos/rackt/react-redux/statuses/ba23c7ea77bccdc334619459689eac74468c7857","head":{"label":"bspaulding:stateless-wrapped-component-ref","ref":"stateless-wrapped-component-ref","sha":"ba23c7ea77bccdc334619459689eac74468c7857","user":{"login":"bspaulding","id":6833,"avatar_url":"https://avatars.githubusercontent.com/u/6833?v=3","gravatar_id":"","url":"https://api.github.com/users/bspaulding","html_url":"https://github.com/bspaulding","followers_url":"https://api.github.com/users/bspaulding/followers","following_url":"https://api.github.com/users/bspaulding/following{/other_user}","gists_url":"https://api.github.com/users/bspaulding/gists{/gist_id}","starred_url":"https://api.github.com/users/bspaulding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bspaulding/subscriptions","organizations_url":"https://api.github.com/users/bspaulding/orgs","repos_url":"https://api.github.com/users/bspaulding/repos","events_url":"https://api.github.com/users/bspaulding/events{/privacy}","received_events_url":"https://api.github.com/users/bspaulding/received_events","type":"User","site_admin":false},"repo":{"id":43904849,"name":"react-redux","full_name":"bspaulding/react-redux","owner":{"login":"bspaulding","id":6833,"avatar_url":"https://avatars.githubusercontent.com/u/6833?v=3","gravatar_id":"","url":"https://api.github.com/users/bspaulding","html_url":"https://github.com/bspaulding","followers_url":"https://api.github.com/users/bspaulding/followers","following_url":"https://api.github.com/users/bspaulding/following{/other_user}","gists_url":"https://api.github.com/users/bspaulding/gists{/gist_id}","starred_url":"https://api.github.com/users/bspaulding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bspaulding/subscriptions","organizations_url":"https://api.github.com/users/bspaulding/orgs","repos_url":"https://api.github.com/users/bspaulding/repos","events_url":"https://api.github.com/users/bspaulding/events{/privacy}","received_events_url":"https://api.github.com/users/bspaulding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bspaulding/react-redux","description":"Official React bindings for Redux","fork":true,"url":"https://api.github.com/repos/bspaulding/react-redux","forks_url":"https://api.github.com/repos/bspaulding/react-redux/forks","keys_url":"https://api.github.com/repos/bspaulding/react-redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bspaulding/react-redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bspaulding/react-redux/teams","hooks_url":"https://api.github.com/repos/bspaulding/react-redux/hooks","issue_events_url":"https://api.github.com/repos/bspaulding/react-redux/issues/events{/number}","events_url":"https://api.github.com/repos/bspaulding/react-redux/events","assignees_url":"https://api.github.com/repos/bspaulding/react-redux/assignees{/user}","branches_url":"https://api.github.com/repos/bspaulding/react-redux/branches{/branch}","tags_url":"https://api.github.com/repos/bspaulding/react-redux/tags","blobs_url":"https://api.github.com/repos/bspaulding/react-redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bspaulding/react-redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bspaulding/react-redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/bspaulding/react-redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bspaulding/react-redux/statuses/{sha}","languages_url":"https://api.github.com/repos/bspaulding/react-redux/languages","stargazers_url":"https://api.github.com/repos/bspaulding/react-redux/stargazers","contributors_url":"https://api.github.com/repos/bspaulding/react-redux/contributors","subscribers_url":"https://api.github.com/repos/bspaulding/react-redux/subscribers","subscription_url":"https://api.github.com/repos/bspaulding/react-redux/subscription","commits_url":"https://api.github.com/repos/bspaulding/react-redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/bspaulding/react-redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/bspaulding/react-redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/bspaulding/react-redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/bspaulding/react-redux/contents/{+path}","compare_url":"https://api.github.com/repos/bspaulding/react-redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bspaulding/react-redux/merges","archive_url":"https://api.github.com/repos/bspaulding/react-redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bspaulding/react-redux/downloads","issues_url":"https://api.github.com/repos/bspaulding/react-redux/issues{/number}","pulls_url":"https://api.github.com/repos/bspaulding/react-redux/pulls{/number}","milestones_url":"https://api.github.com/repos/bspaulding/react-redux/milestones{/number}","notifications_url":"https://api.github.com/repos/bspaulding/react-redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bspaulding/react-redux/labels{/name}","releases_url":"https://api.github.com/repos/bspaulding/react-redux/releases{/id}","created_at":"2015-10-08T17:14:24Z","updated_at":"2015-10-08T17:14:25Z","pushed_at":"2015-10-08T22:42:27Z","git_url":"git://github.com/bspaulding/react-redux.git","ssh_url":"git@github.com:bspaulding/react-redux.git","clone_url":"https://github.com/bspaulding/react-redux.git","svn_url":"https://github.com/bspaulding/react-redux","homepage":"http://rackt.github.io/redux/docs/basics/UsageWithReact.html","size":714,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"rackt:master","ref":"master","sha":"f9dfe461b730530c1a04061d6018540173efd5d1","user":{"login":"rackt","id":8261421,"avatar_url":"https://avatars.githubusercontent.com/u/8261421?v=3","gravatar_id":"","url":"https://api.github.com/users/rackt","html_url":"https://github.com/rackt","followers_url":"https://api.github.com/users/rackt/followers","following_url":"https://api.github.com/users/rackt/following{/other_user}","gists_url":"https://api.github.com/users/rackt/gists{/gist_id}","starred_url":"https://api.github.com/users/rackt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackt/subscriptions","organizations_url":"https://api.github.com/users/rackt/orgs","repos_url":"https://api.github.com/users/rackt/repos","events_url":"https://api.github.com/users/rackt/events{/privacy}","received_events_url":"https://api.github.com/users/rackt/received_events","type":"Organization","site_admin":false},"repo":{"id":38934449,"name":"react-redux","full_name":"rackt/react-redux","owner":{"login":"rackt","id":8261421,"avatar_url":"https://avatars.githubusercontent.com/u/8261421?v=3","gravatar_id":"","url":"https://api.github.com/users/rackt","html_url":"https://github.com/rackt","followers_url":"https://api.github.com/users/rackt/followers","following_url":"https://api.github.com/users/rackt/following{/other_user}","gists_url":"https://api.github.com/users/rackt/gists{/gist_id}","starred_url":"https://api.github.com/users/rackt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackt/subscriptions","organizations_url":"https://api.github.com/users/rackt/orgs","repos_url":"https://api.github.com/users/rackt/repos","events_url":"https://api.github.com/users/rackt/events{/privacy}","received_events_url":"https://api.github.com/users/rackt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackt/react-redux","description":"Official React bindings for Redux","fork":false,"url":"https://api.github.com/repos/rackt/react-redux","forks_url":"https://api.github.com/repos/rackt/react-redux/forks","keys_url":"https://api.github.com/repos/rackt/react-redux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackt/react-redux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackt/react-redux/teams","hooks_url":"https://api.github.com/repos/rackt/react-redux/hooks","issue_events_url":"https://api.github.com/repos/rackt/react-redux/issues/events{/number}","events_url":"https://api.github.com/repos/rackt/react-redux/events","assignees_url":"https://api.github.com/repos/rackt/react-redux/assignees{/user}","branches_url":"https://api.github.com/repos/rackt/react-redux/branches{/branch}","tags_url":"https://api.github.com/repos/rackt/react-redux/tags","blobs_url":"https://api.github.com/repos/rackt/react-redux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackt/react-redux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackt/react-redux/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackt/react-redux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackt/react-redux/statuses/{sha}","languages_url":"https://api.github.com/repos/rackt/react-redux/languages","stargazers_url":"https://api.github.com/repos/rackt/react-redux/stargazers","contributors_url":"https://api.github.com/repos/rackt/react-redux/contributors","subscribers_url":"https://api.github.com/repos/rackt/react-redux/subscribers","subscription_url":"https://api.github.com/repos/rackt/react-redux/subscription","commits_url":"https://api.github.com/repos/rackt/react-redux/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackt/react-redux/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackt/react-redux/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackt/react-redux/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackt/react-redux/contents/{+path}","compare_url":"https://api.github.com/repos/rackt/react-redux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackt/react-redux/merges","archive_url":"https://api.github.com/repos/rackt/react-redux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackt/react-redux/downloads","issues_url":"https://api.github.com/repos/rackt/react-redux/issues{/number}","pulls_url":"https://api.github.com/repos/rackt/react-redux/pulls{/number}","milestones_url":"https://api.github.com/repos/rackt/react-redux/milestones{/number}","notifications_url":"https://api.github.com/repos/rackt/react-redux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackt/react-redux/labels{/name}","releases_url":"https://api.github.com/repos/rackt/react-redux/releases{/id}","created_at":"2015-07-11T17:32:01Z","updated_at":"2015-10-09T15:55:34Z","pushed_at":"2015-10-09T18:46:03Z","git_url":"git://github.com/rackt/react-redux.git","ssh_url":"git@github.com:rackt/react-redux.git","clone_url":"https://github.com/rackt/react-redux.git","svn_url":"https://github.com/rackt/react-redux","homepage":"http://rackt.github.io/redux/docs/basics/UsageWithReact.html","size":714,"stargazers_count":817,"watchers_count":817,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":11,"forks":91,"open_issues":11,"watchers":817,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackt/react-redux/pulls/143"},"html":{"href":"https://github.com/rackt/react-redux/pull/143"},"issue":{"href":"https://api.github.com/repos/rackt/react-redux/issues/143"},"comments":{"href":"https://api.github.com/repos/rackt/react-redux/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/rackt/react-redux/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/rackt/react-redux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackt/react-redux/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/rackt/react-redux/statuses/ba23c7ea77bccdc334619459689eac74468c7857"}}}}