{"action":"created","comment":{"url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/comments/86298444","pull_request_review_id":6962061,"id":86298444,"diff_hunk":"@@ -0,0 +1,63 @@\n+import React, { PropTypes, Component } from \"react\";\n+import { Observable } from 'rxjs/Rx';\n+\n+// Creates a state for use with the connect and provider below\n+export function createState(reducer$, initialState$ = Observable.of({})) {\n+  return initialState$\n+    .merge(reducer$)\n+    .scan((state, [scope, reducer]) =>\n+      ({ ...state, [scope]: reducer(state[scope]) }))\n+    .publishReplay(1)\n+    .refCount();\n+}\n+\n+// Used much the same way as redux connect\n+export const connect = (selector = state => state) => (providedState$) => {\n+  return function wrapWithConnect(WrappedComponent) {\n+    return class Connect extends Component {\n+      state$ = providedState$;\n+\n+      static contextTypes = {\n+        state$: PropTypes.object // .isRequired\n+      };\n+\n+      constructor(props, context) {\n+        super(props, context);\n+        this.state$ = this.context.state$ || this.state$;","path":"src/state/RxState.js","position":26,"original_position":26,"commit_id":"7c8be59211758237820d7b11c81e68bf5de411c5","original_commit_id":"7c8be59211758237820d7b11c81e68bf5de411c5","user":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"body":"Maybe i can swap this OR condition. So that some connected components use their own state ","created_at":"2016-11-03T08:18:07Z","updated_at":"2016-11-03T08:18:18Z","html_url":"https://github.com/MUSIT-Norway/musit-frontend/pull/162#discussion_r86298444","pull_request_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/comments/86298444"},"html":{"href":"https://github.com/MUSIT-Norway/musit-frontend/pull/162#discussion_r86298444"},"pull_request":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162","id":92034497,"html_url":"https://github.com/MUSIT-Norway/musit-frontend/pull/162","diff_url":"https://github.com/MUSIT-Norway/musit-frontend/pull/162.diff","patch_url":"https://github.com/MUSIT-Norway/musit-frontend/pull/162.patch","issue_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/issues/162","number":162,"state":"open","locked":false,"title":"Fix actor suggest component hammering the service for every typed character","user":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-02T19:00:22Z","updated_at":"2016-11-03T08:18:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38e118012fb30d3a121af5af4f4dc7591afe660a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162/commits","review_comments_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162/comments","review_comment_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/issues/162/comments","statuses_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/statuses/7c8be59211758237820d7b11c81e68bf5de411c5","head":{"label":"jarlah:RXJS_OBSERVABLE","ref":"RXJS_OBSERVABLE","sha":"7c8be59211758237820d7b11c81e68bf5de411c5","user":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"repo":{"id":65816951,"name":"musit-frontend","full_name":"jarlah/musit-frontend","owner":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jarlah/musit-frontend","description":null,"fork":true,"url":"https://api.github.com/repos/jarlah/musit-frontend","forks_url":"https://api.github.com/repos/jarlah/musit-frontend/forks","keys_url":"https://api.github.com/repos/jarlah/musit-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jarlah/musit-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jarlah/musit-frontend/teams","hooks_url":"https://api.github.com/repos/jarlah/musit-frontend/hooks","issue_events_url":"https://api.github.com/repos/jarlah/musit-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/jarlah/musit-frontend/events","assignees_url":"https://api.github.com/repos/jarlah/musit-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/jarlah/musit-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/jarlah/musit-frontend/tags","blobs_url":"https://api.github.com/repos/jarlah/musit-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jarlah/musit-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jarlah/musit-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/jarlah/musit-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jarlah/musit-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/jarlah/musit-frontend/languages","stargazers_url":"https://api.github.com/repos/jarlah/musit-frontend/stargazers","contributors_url":"https://api.github.com/repos/jarlah/musit-frontend/contributors","subscribers_url":"https://api.github.com/repos/jarlah/musit-frontend/subscribers","subscription_url":"https://api.github.com/repos/jarlah/musit-frontend/subscription","commits_url":"https://api.github.com/repos/jarlah/musit-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/jarlah/musit-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/jarlah/musit-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/jarlah/musit-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/jarlah/musit-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/jarlah/musit-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jarlah/musit-frontend/merges","archive_url":"https://api.github.com/repos/jarlah/musit-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jarlah/musit-frontend/downloads","issues_url":"https://api.github.com/repos/jarlah/musit-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/jarlah/musit-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/jarlah/musit-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/jarlah/musit-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jarlah/musit-frontend/labels{/name}","releases_url":"https://api.github.com/repos/jarlah/musit-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/jarlah/musit-frontend/deployments","created_at":"2016-08-16T12:08:04Z","updated_at":"2016-08-16T12:08:05Z","pushed_at":"2016-11-03T08:05:17Z","git_url":"git://github.com/jarlah/musit-frontend.git","ssh_url":"git@github.com:jarlah/musit-frontend.git","clone_url":"https://github.com/jarlah/musit-frontend.git","svn_url":"https://github.com/jarlah/musit-frontend","homepage":null,"size":2749,"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":"MUSIT-Norway:master","ref":"master","sha":"a691511cb0b3b4fdbeaf7e617af807f44dcc4774","user":{"login":"MUSIT-Norway","id":17343809,"avatar_url":"https://avatars.githubusercontent.com/u/17343809?v=3","gravatar_id":"","url":"https://api.github.com/users/MUSIT-Norway","html_url":"https://github.com/MUSIT-Norway","followers_url":"https://api.github.com/users/MUSIT-Norway/followers","following_url":"https://api.github.com/users/MUSIT-Norway/following{/other_user}","gists_url":"https://api.github.com/users/MUSIT-Norway/gists{/gist_id}","starred_url":"https://api.github.com/users/MUSIT-Norway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MUSIT-Norway/subscriptions","organizations_url":"https://api.github.com/users/MUSIT-Norway/orgs","repos_url":"https://api.github.com/users/MUSIT-Norway/repos","events_url":"https://api.github.com/users/MUSIT-Norway/events{/privacy}","received_events_url":"https://api.github.com/users/MUSIT-Norway/received_events","type":"Organization","site_admin":false},"repo":{"id":65810519,"name":"musit-frontend","full_name":"MUSIT-Norway/musit-frontend","owner":{"login":"MUSIT-Norway","id":17343809,"avatar_url":"https://avatars.githubusercontent.com/u/17343809?v=3","gravatar_id":"","url":"https://api.github.com/users/MUSIT-Norway","html_url":"https://github.com/MUSIT-Norway","followers_url":"https://api.github.com/users/MUSIT-Norway/followers","following_url":"https://api.github.com/users/MUSIT-Norway/following{/other_user}","gists_url":"https://api.github.com/users/MUSIT-Norway/gists{/gist_id}","starred_url":"https://api.github.com/users/MUSIT-Norway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MUSIT-Norway/subscriptions","organizations_url":"https://api.github.com/users/MUSIT-Norway/orgs","repos_url":"https://api.github.com/users/MUSIT-Norway/repos","events_url":"https://api.github.com/users/MUSIT-Norway/events{/privacy}","received_events_url":"https://api.github.com/users/MUSIT-Norway/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MUSIT-Norway/musit-frontend","description":"Norwegian university museums IT organization (MUSIT); cultural history and natural history database with store integration","fork":false,"url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend","forks_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/forks","keys_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/teams","hooks_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/hooks","issue_events_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/events","assignees_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/tags","blobs_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/languages","stargazers_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/stargazers","contributors_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/contributors","subscribers_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/subscribers","subscription_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/subscription","commits_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/merges","archive_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/downloads","issues_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/labels{/name}","releases_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/deployments","created_at":"2016-08-16T10:17:16Z","updated_at":"2016-11-02T10:20:49Z","pushed_at":"2016-11-03T08:05:17Z","git_url":"git://github.com/MUSIT-Norway/musit-frontend.git","ssh_url":"git@github.com:MUSIT-Norway/musit-frontend.git","clone_url":"https://github.com/MUSIT-Norway/musit-frontend.git","svn_url":"https://github.com/MUSIT-Norway/musit-frontend","homepage":"","size":4223,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162"},"html":{"href":"https://github.com/MUSIT-Norway/musit-frontend/pull/162"},"issue":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/issues/162"},"comments":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/MUSIT-Norway/musit-frontend/statuses/7c8be59211758237820d7b11c81e68bf5de411c5"}}}}
{"actor":{"display_login":"jarlah"}}