{"action":"created","comment":{"url":"https://api.github.com/repos/algolia/instantsearch.js/pulls/comments/36295086","id":36295086,"diff_hunk":"@@ -7,27 +7,46 @@ var TemplateFn = require('../templates/Function');\n \n class Hits extends React.Component {\n   render() {\n-    var results = this.props.results;\n-    if (!results || !results.hits || results.hits.length === 0) {\n-      return this.renderNoResults(results, this.props.noResultsTemplate);\n+    if (this.props.hits.length === 0) {\n+      return this.renderNoResults();\n     }\n-    return this.renderWithResults(results.hits, this.props.hitTemplate);\n+\n+    return this.renderWithResults();\n   }\n-  renderWithResults(hits, hitTemplate) {\n-    var TemplateComponent = isString(hitTemplate) ? Hogan : TemplateFn;\n-    var renderedHits = map(hits, function(hit) {\n-      return <TemplateComponent data={hit} key={hit.objectID} template={hitTemplate} />;\n-    });\n-    return <div className=\"search_list search_results_container row\">{renderedHits}</div>;\n+\n+  renderWithResults() {\n+    var TemplateComponent = isString(this.props.hitTemplate) ? Hogan : TemplateFn;\n+\n+    var renderedHits = map(this.props.hits, function(hit) {\n+      return <TemplateComponent data={hit} key={hit.objectID} template={this.props.hitTemplate} />;\n+    }, this);\n+\n+    return <div>{renderedHits}</div>;\n   }\n-  renderNoResults(results, noResultsTemplate) {\n-    var TemplateComponent = isString(noResultsTemplate) ? Hogan : TemplateFn;\n+\n+  renderNoResults() {\n+    var TemplateComponent = isString(this.props.noResultsTemplate) ? Hogan : TemplateFn;\n+\n     return (\n-      <div className=\"search_list search_results_container row\">","path":"components/Hits/index.js","position":37,"original_position":37,"commit_id":"da44aed3afdc8357be6400f7c646aef140d79b18","original_commit_id":"da44aed3afdc8357be6400f7c646aef140d79b18","user":{"login":"bobylito","id":393765,"avatar_url":"https://avatars.githubusercontent.com/u/393765?v=3","gravatar_id":"","url":"https://api.github.com/users/bobylito","html_url":"https://github.com/bobylito","followers_url":"https://api.github.com/users/bobylito/followers","following_url":"https://api.github.com/users/bobylito/following{/other_user}","gists_url":"https://api.github.com/users/bobylito/gists{/gist_id}","starred_url":"https://api.github.com/users/bobylito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobylito/subscriptions","organizations_url":"https://api.github.com/users/bobylito/orgs","repos_url":"https://api.github.com/users/bobylito/repos","events_url":"https://api.github.com/users/bobylito/events{/privacy}","received_events_url":"https://api.github.com/users/bobylito/received_events","type":"User","site_admin":false},"body":"Why do we remove the class on the surrounding div?","created_at":"2015-08-05T12:22:35Z","updated_at":"2015-08-05T12:22:35Z","html_url":"https://github.com/algolia/instantsearch.js/pull/35#discussion_r36295086","pull_request_url":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/algolia/instantsearch.js/pulls/comments/36295086"},"html":{"href":"https://github.com/algolia/instantsearch.js/pull/35#discussion_r36295086"},"pull_request":{"href":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35","id":41623615,"html_url":"https://github.com/algolia/instantsearch.js/pull/35","diff_url":"https://github.com/algolia/instantsearch.js/pull/35.diff","patch_url":"https://github.com/algolia/instantsearch.js/pull/35.patch","issue_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/35","number":35,"state":"open","locked":false,"title":"feat(hits): allow configuring hitsPerPage","user":{"login":"vvo","id":123822,"avatar_url":"https://avatars.githubusercontent.com/u/123822?v=3","gravatar_id":"","url":"https://api.github.com/users/vvo","html_url":"https://github.com/vvo","followers_url":"https://api.github.com/users/vvo/followers","following_url":"https://api.github.com/users/vvo/following{/other_user}","gists_url":"https://api.github.com/users/vvo/gists{/gist_id}","starred_url":"https://api.github.com/users/vvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvo/subscriptions","organizations_url":"https://api.github.com/users/vvo/orgs","repos_url":"https://api.github.com/users/vvo/repos","events_url":"https://api.github.com/users/vvo/events{/privacy}","received_events_url":"https://api.github.com/users/vvo/received_events","type":"User","site_admin":false},"body":"+ allow configuring hitsPerPage on hits widget\r\n+ rewrite a little of the hits widget to only use what we need to use (may have to expose more things in the future, like the query done in the empty template)\r\n+ rename noResults in the widget API to empty (typeahead style)\r\n+ removed hitsPerPage configuration from the pagination template\r\n+ some linting and deps upgrade for free","created_at":"2015-08-04T22:09:03Z","updated_at":"2015-08-05T12:22:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9b38c864b326b39e7ac1a4ffbe1582aa3fd387c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35/commits","review_comments_url":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35/comments","review_comment_url":"https://api.github.com/repos/algolia/instantsearch.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/35/comments","statuses_url":"https://api.github.com/repos/algolia/instantsearch.js/statuses/da44aed3afdc8357be6400f7c646aef140d79b18","head":{"label":"algolia:fix/hitsPerPage-only-on-hits","ref":"fix/hitsPerPage-only-on-hits","sha":"da44aed3afdc8357be6400f7c646aef140d79b18","user":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":39443258,"name":"instantsearch.js","full_name":"algolia/instantsearch.js","owner":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algolia/instantsearch.js","description":"Instant search for everyone","fork":false,"url":"https://api.github.com/repos/algolia/instantsearch.js","forks_url":"https://api.github.com/repos/algolia/instantsearch.js/forks","keys_url":"https://api.github.com/repos/algolia/instantsearch.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/instantsearch.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/instantsearch.js/teams","hooks_url":"https://api.github.com/repos/algolia/instantsearch.js/hooks","issue_events_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/instantsearch.js/events","assignees_url":"https://api.github.com/repos/algolia/instantsearch.js/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/instantsearch.js/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/instantsearch.js/tags","blobs_url":"https://api.github.com/repos/algolia/instantsearch.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/instantsearch.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/instantsearch.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/instantsearch.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/instantsearch.js/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/instantsearch.js/languages","stargazers_url":"https://api.github.com/repos/algolia/instantsearch.js/stargazers","contributors_url":"https://api.github.com/repos/algolia/instantsearch.js/contributors","subscribers_url":"https://api.github.com/repos/algolia/instantsearch.js/subscribers","subscription_url":"https://api.github.com/repos/algolia/instantsearch.js/subscription","commits_url":"https://api.github.com/repos/algolia/instantsearch.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/instantsearch.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/instantsearch.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/instantsearch.js/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/instantsearch.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/instantsearch.js/merges","archive_url":"https://api.github.com/repos/algolia/instantsearch.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/instantsearch.js/downloads","issues_url":"https://api.github.com/repos/algolia/instantsearch.js/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/instantsearch.js/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/instantsearch.js/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/instantsearch.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/instantsearch.js/labels{/name}","releases_url":"https://api.github.com/repos/algolia/instantsearch.js/releases{/id}","created_at":"2015-07-21T12:10:27Z","updated_at":"2015-08-01T10:14:14Z","pushed_at":"2015-08-04T22:10:54Z","git_url":"git://github.com/algolia/instantsearch.js.git","ssh_url":"git@github.com:algolia/instantsearch.js.git","clone_url":"https://github.com/algolia/instantsearch.js.git","svn_url":"https://github.com/algolia/instantsearch.js","homepage":null,"size":276,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":2,"default_branch":"master"}},"base":{"label":"algolia:develop","ref":"develop","sha":"daa312d1f2c521e2c10b016a4c3e5a9dab4f3ec1","user":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":39443258,"name":"instantsearch.js","full_name":"algolia/instantsearch.js","owner":{"login":"algolia","id":2034458,"avatar_url":"https://avatars.githubusercontent.com/u/2034458?v=3","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algolia/instantsearch.js","description":"Instant search for everyone","fork":false,"url":"https://api.github.com/repos/algolia/instantsearch.js","forks_url":"https://api.github.com/repos/algolia/instantsearch.js/forks","keys_url":"https://api.github.com/repos/algolia/instantsearch.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/instantsearch.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/instantsearch.js/teams","hooks_url":"https://api.github.com/repos/algolia/instantsearch.js/hooks","issue_events_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/instantsearch.js/events","assignees_url":"https://api.github.com/repos/algolia/instantsearch.js/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/instantsearch.js/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/instantsearch.js/tags","blobs_url":"https://api.github.com/repos/algolia/instantsearch.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/instantsearch.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/instantsearch.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/instantsearch.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/instantsearch.js/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/instantsearch.js/languages","stargazers_url":"https://api.github.com/repos/algolia/instantsearch.js/stargazers","contributors_url":"https://api.github.com/repos/algolia/instantsearch.js/contributors","subscribers_url":"https://api.github.com/repos/algolia/instantsearch.js/subscribers","subscription_url":"https://api.github.com/repos/algolia/instantsearch.js/subscription","commits_url":"https://api.github.com/repos/algolia/instantsearch.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/instantsearch.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/instantsearch.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/instantsearch.js/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/instantsearch.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/instantsearch.js/merges","archive_url":"https://api.github.com/repos/algolia/instantsearch.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/instantsearch.js/downloads","issues_url":"https://api.github.com/repos/algolia/instantsearch.js/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/instantsearch.js/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/instantsearch.js/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/instantsearch.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/instantsearch.js/labels{/name}","releases_url":"https://api.github.com/repos/algolia/instantsearch.js/releases{/id}","created_at":"2015-07-21T12:10:27Z","updated_at":"2015-08-01T10:14:14Z","pushed_at":"2015-08-04T22:10:54Z","git_url":"git://github.com/algolia/instantsearch.js.git","ssh_url":"git@github.com:algolia/instantsearch.js.git","clone_url":"https://github.com/algolia/instantsearch.js.git","svn_url":"https://github.com/algolia/instantsearch.js","homepage":null,"size":276,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35"},"html":{"href":"https://github.com/algolia/instantsearch.js/pull/35"},"issue":{"href":"https://api.github.com/repos/algolia/instantsearch.js/issues/35"},"comments":{"href":"https://api.github.com/repos/algolia/instantsearch.js/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/algolia/instantsearch.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/algolia/instantsearch.js/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/algolia/instantsearch.js/statuses/da44aed3afdc8357be6400f7c646aef140d79b18"}}}}