{"action":"created","comment":{"url":"https://api.github.com/repos/Quesarito/related-items-service/pulls/comments/243874502","pull_request_review_id":187750491,"id":243874502,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mzg3NDUwMg==","diff_hunk":"@@ -3,17 +3,116 @@ import ReactDOM from 'react-dom';\n \n import axios from 'axios';\n \n+import RelatedItemList from './components/RelatedItemList.jsx';\n+\n+\n class App extends React.Component {\n     constructor(props) {\n         super(props);\n+        this.state = {\n+            relatedItems: [],\n+            relatedItemInfo: [],\n+            relatedItemsCurrent: [],\n+            currentArr: 0,\n+            maxRelatedLength: 5,\n+            itemId: 40\n+        }\n+\n+        // click bindings\n+        this.arrowClick = this.arrowClick.bind(this);","path":"client/src/index.jsx","position":20,"original_position":20,"commit_id":"1ba584ecc05f6d4eb7a46fedee25ab0788352832","original_commit_id":"1ba584ecc05f6d4eb7a46fedee25ab0788352832","user":{"login":"velezjose","id":28854899,"node_id":"MDQ6VXNlcjI4ODU0ODk5","avatar_url":"https://avatars1.githubusercontent.com/u/28854899?v=4","gravatar_id":"","url":"https://api.github.com/users/velezjose","html_url":"https://github.com/velezjose","followers_url":"https://api.github.com/users/velezjose/followers","following_url":"https://api.github.com/users/velezjose/following{/other_user}","gists_url":"https://api.github.com/users/velezjose/gists{/gist_id}","starred_url":"https://api.github.com/users/velezjose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/velezjose/subscriptions","organizations_url":"https://api.github.com/users/velezjose/orgs","repos_url":"https://api.github.com/users/velezjose/repos","events_url":"https://api.github.com/users/velezjose/events{/privacy}","received_events_url":"https://api.github.com/users/velezjose/received_events","type":"User","site_admin":false},"body":"I never knew you could do this in the constructor of the class instead of passing the function and having to bind `this` right when it's passed to the class's child component.","created_at":"2018-12-25T04:51:47Z","updated_at":"2018-12-25T04:51:47Z","html_url":"https://github.com/Quesarito/related-items-service/pull/4#discussion_r243874502","pull_request_url":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Quesarito/related-items-service/pulls/comments/243874502"},"html":{"href":"https://github.com/Quesarito/related-items-service/pull/4#discussion_r243874502"},"pull_request":{"href":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4","id":240824638,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwODI0NjM4","html_url":"https://github.com/Quesarito/related-items-service/pull/4","diff_url":"https://github.com/Quesarito/related-items-service/pull/4.diff","patch_url":"https://github.com/Quesarito/related-items-service/pull/4.patch","issue_url":"https://api.github.com/repos/Quesarito/related-items-service/issues/4","number":4,"state":"open","locked":false,"title":"Related items comp","user":{"login":"alexminer88","id":20400727,"node_id":"MDQ6VXNlcjIwNDAwNzI3","avatar_url":"https://avatars0.githubusercontent.com/u/20400727?v=4","gravatar_id":"","url":"https://api.github.com/users/alexminer88","html_url":"https://github.com/alexminer88","followers_url":"https://api.github.com/users/alexminer88/followers","following_url":"https://api.github.com/users/alexminer88/following{/other_user}","gists_url":"https://api.github.com/users/alexminer88/gists{/gist_id}","starred_url":"https://api.github.com/users/alexminer88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexminer88/subscriptions","organizations_url":"https://api.github.com/users/alexminer88/orgs","repos_url":"https://api.github.com/users/alexminer88/repos","events_url":"https://api.github.com/users/alexminer88/events{/privacy}","received_events_url":"https://api.github.com/users/alexminer88/received_events","type":"User","site_admin":false},"body":"I moved the implementation of my database seed to generateSeedData.js.\r\nAlso, this is the first commit for the related items component. I have implemented the onClick handlers for the arrows.\r\nI wanted some feedback on a few things:\r\n1. For see generation I need to connect to the db, but it seems as if this connection is persistent from this file after I run it, should I end the connection at the end of the file?\r\n2. I tried using promises to set relatedItemsCurrent after the get request for /api/related/:itemId  has been finished, but it runs immediately, any suggestions?\r\n","created_at":"2018-12-25T02:48:53Z","updated_at":"2018-12-25T04:51:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dba8de3dfacb8cd0bbd717355eb10a0549a03c33","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Quesarito/related-items-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Quesarito/related-items-service/issues/4/comments","statuses_url":"https://api.github.com/repos/Quesarito/related-items-service/statuses/1ba584ecc05f6d4eb7a46fedee25ab0788352832","head":{"label":"Quesarito:relatedItemsComp","ref":"relatedItemsComp","sha":"1ba584ecc05f6d4eb7a46fedee25ab0788352832","user":{"login":"Quesarito","id":45985466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTg1NDY2","avatar_url":"https://avatars1.githubusercontent.com/u/45985466?v=4","gravatar_id":"","url":"https://api.github.com/users/Quesarito","html_url":"https://github.com/Quesarito","followers_url":"https://api.github.com/users/Quesarito/followers","following_url":"https://api.github.com/users/Quesarito/following{/other_user}","gists_url":"https://api.github.com/users/Quesarito/gists{/gist_id}","starred_url":"https://api.github.com/users/Quesarito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quesarito/subscriptions","organizations_url":"https://api.github.com/users/Quesarito/orgs","repos_url":"https://api.github.com/users/Quesarito/repos","events_url":"https://api.github.com/users/Quesarito/events{/privacy}","received_events_url":"https://api.github.com/users/Quesarito/received_events","type":"Organization","site_admin":false},"repo":{"id":162375605,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIzNzU2MDU=","name":"related-items-service","full_name":"Quesarito/related-items-service","private":false,"owner":{"login":"Quesarito","id":45985466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTg1NDY2","avatar_url":"https://avatars1.githubusercontent.com/u/45985466?v=4","gravatar_id":"","url":"https://api.github.com/users/Quesarito","html_url":"https://github.com/Quesarito","followers_url":"https://api.github.com/users/Quesarito/followers","following_url":"https://api.github.com/users/Quesarito/following{/other_user}","gists_url":"https://api.github.com/users/Quesarito/gists{/gist_id}","starred_url":"https://api.github.com/users/Quesarito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quesarito/subscriptions","organizations_url":"https://api.github.com/users/Quesarito/orgs","repos_url":"https://api.github.com/users/Quesarito/repos","events_url":"https://api.github.com/users/Quesarito/events{/privacy}","received_events_url":"https://api.github.com/users/Quesarito/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Quesarito/related-items-service","description":null,"fork":false,"url":"https://api.github.com/repos/Quesarito/related-items-service","forks_url":"https://api.github.com/repos/Quesarito/related-items-service/forks","keys_url":"https://api.github.com/repos/Quesarito/related-items-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Quesarito/related-items-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Quesarito/related-items-service/teams","hooks_url":"https://api.github.com/repos/Quesarito/related-items-service/hooks","issue_events_url":"https://api.github.com/repos/Quesarito/related-items-service/issues/events{/number}","events_url":"https://api.github.com/repos/Quesarito/related-items-service/events","assignees_url":"https://api.github.com/repos/Quesarito/related-items-service/assignees{/user}","branches_url":"https://api.github.com/repos/Quesarito/related-items-service/branches{/branch}","tags_url":"https://api.github.com/repos/Quesarito/related-items-service/tags","blobs_url":"https://api.github.com/repos/Quesarito/related-items-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Quesarito/related-items-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Quesarito/related-items-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/Quesarito/related-items-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Quesarito/related-items-service/statuses/{sha}","languages_url":"https://api.github.com/repos/Quesarito/related-items-service/languages","stargazers_url":"https://api.github.com/repos/Quesarito/related-items-service/stargazers","contributors_url":"https://api.github.com/repos/Quesarito/related-items-service/contributors","subscribers_url":"https://api.github.com/repos/Quesarito/related-items-service/subscribers","subscription_url":"https://api.github.com/repos/Quesarito/related-items-service/subscription","commits_url":"https://api.github.com/repos/Quesarito/related-items-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/Quesarito/related-items-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/Quesarito/related-items-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/Quesarito/related-items-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/Quesarito/related-items-service/contents/{+path}","compare_url":"https://api.github.com/repos/Quesarito/related-items-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Quesarito/related-items-service/merges","archive_url":"https://api.github.com/repos/Quesarito/related-items-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Quesarito/related-items-service/downloads","issues_url":"https://api.github.com/repos/Quesarito/related-items-service/issues{/number}","pulls_url":"https://api.github.com/repos/Quesarito/related-items-service/pulls{/number}","milestones_url":"https://api.github.com/repos/Quesarito/related-items-service/milestones{/number}","notifications_url":"https://api.github.com/repos/Quesarito/related-items-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Quesarito/related-items-service/labels{/name}","releases_url":"https://api.github.com/repos/Quesarito/related-items-service/releases{/id}","deployments_url":"https://api.github.com/repos/Quesarito/related-items-service/deployments","created_at":"2018-12-19T03:05:22Z","updated_at":"2018-12-23T18:24:04Z","pushed_at":"2018-12-25T02:48:54Z","git_url":"git://github.com/Quesarito/related-items-service.git","ssh_url":"git@github.com:Quesarito/related-items-service.git","clone_url":"https://github.com/Quesarito/related-items-service.git","svn_url":"https://github.com/Quesarito/related-items-service","homepage":null,"size":355,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Quesarito:master","ref":"master","sha":"495bd4f1e42e772e777df89559e40cf1c6062ac8","user":{"login":"Quesarito","id":45985466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTg1NDY2","avatar_url":"https://avatars1.githubusercontent.com/u/45985466?v=4","gravatar_id":"","url":"https://api.github.com/users/Quesarito","html_url":"https://github.com/Quesarito","followers_url":"https://api.github.com/users/Quesarito/followers","following_url":"https://api.github.com/users/Quesarito/following{/other_user}","gists_url":"https://api.github.com/users/Quesarito/gists{/gist_id}","starred_url":"https://api.github.com/users/Quesarito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quesarito/subscriptions","organizations_url":"https://api.github.com/users/Quesarito/orgs","repos_url":"https://api.github.com/users/Quesarito/repos","events_url":"https://api.github.com/users/Quesarito/events{/privacy}","received_events_url":"https://api.github.com/users/Quesarito/received_events","type":"Organization","site_admin":false},"repo":{"id":162375605,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIzNzU2MDU=","name":"related-items-service","full_name":"Quesarito/related-items-service","private":false,"owner":{"login":"Quesarito","id":45985466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTg1NDY2","avatar_url":"https://avatars1.githubusercontent.com/u/45985466?v=4","gravatar_id":"","url":"https://api.github.com/users/Quesarito","html_url":"https://github.com/Quesarito","followers_url":"https://api.github.com/users/Quesarito/followers","following_url":"https://api.github.com/users/Quesarito/following{/other_user}","gists_url":"https://api.github.com/users/Quesarito/gists{/gist_id}","starred_url":"https://api.github.com/users/Quesarito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quesarito/subscriptions","organizations_url":"https://api.github.com/users/Quesarito/orgs","repos_url":"https://api.github.com/users/Quesarito/repos","events_url":"https://api.github.com/users/Quesarito/events{/privacy}","received_events_url":"https://api.github.com/users/Quesarito/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Quesarito/related-items-service","description":null,"fork":false,"url":"https://api.github.com/repos/Quesarito/related-items-service","forks_url":"https://api.github.com/repos/Quesarito/related-items-service/forks","keys_url":"https://api.github.com/repos/Quesarito/related-items-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Quesarito/related-items-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Quesarito/related-items-service/teams","hooks_url":"https://api.github.com/repos/Quesarito/related-items-service/hooks","issue_events_url":"https://api.github.com/repos/Quesarito/related-items-service/issues/events{/number}","events_url":"https://api.github.com/repos/Quesarito/related-items-service/events","assignees_url":"https://api.github.com/repos/Quesarito/related-items-service/assignees{/user}","branches_url":"https://api.github.com/repos/Quesarito/related-items-service/branches{/branch}","tags_url":"https://api.github.com/repos/Quesarito/related-items-service/tags","blobs_url":"https://api.github.com/repos/Quesarito/related-items-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Quesarito/related-items-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Quesarito/related-items-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/Quesarito/related-items-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Quesarito/related-items-service/statuses/{sha}","languages_url":"https://api.github.com/repos/Quesarito/related-items-service/languages","stargazers_url":"https://api.github.com/repos/Quesarito/related-items-service/stargazers","contributors_url":"https://api.github.com/repos/Quesarito/related-items-service/contributors","subscribers_url":"https://api.github.com/repos/Quesarito/related-items-service/subscribers","subscription_url":"https://api.github.com/repos/Quesarito/related-items-service/subscription","commits_url":"https://api.github.com/repos/Quesarito/related-items-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/Quesarito/related-items-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/Quesarito/related-items-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/Quesarito/related-items-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/Quesarito/related-items-service/contents/{+path}","compare_url":"https://api.github.com/repos/Quesarito/related-items-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Quesarito/related-items-service/merges","archive_url":"https://api.github.com/repos/Quesarito/related-items-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Quesarito/related-items-service/downloads","issues_url":"https://api.github.com/repos/Quesarito/related-items-service/issues{/number}","pulls_url":"https://api.github.com/repos/Quesarito/related-items-service/pulls{/number}","milestones_url":"https://api.github.com/repos/Quesarito/related-items-service/milestones{/number}","notifications_url":"https://api.github.com/repos/Quesarito/related-items-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Quesarito/related-items-service/labels{/name}","releases_url":"https://api.github.com/repos/Quesarito/related-items-service/releases{/id}","deployments_url":"https://api.github.com/repos/Quesarito/related-items-service/deployments","created_at":"2018-12-19T03:05:22Z","updated_at":"2018-12-23T18:24:04Z","pushed_at":"2018-12-25T02:48:54Z","git_url":"git://github.com/Quesarito/related-items-service.git","ssh_url":"git@github.com:Quesarito/related-items-service.git","clone_url":"https://github.com/Quesarito/related-items-service.git","svn_url":"https://github.com/Quesarito/related-items-service","homepage":null,"size":355,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4"},"html":{"href":"https://github.com/Quesarito/related-items-service/pull/4"},"issue":{"href":"https://api.github.com/repos/Quesarito/related-items-service/issues/4"},"comments":{"href":"https://api.github.com/repos/Quesarito/related-items-service/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Quesarito/related-items-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Quesarito/related-items-service/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Quesarito/related-items-service/statuses/1ba584ecc05f6d4eb7a46fedee25ab0788352832"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"velezjose"}}