{"action":"opened","number":237,"pull_request":{"url":"https://api.github.com/repos/DBCDK/content-first/pulls/237","id":171562017,"html_url":"https://github.com/DBCDK/content-first/pull/237","diff_url":"https://github.com/DBCDK/content-first/pull/237.diff","patch_url":"https://github.com/DBCDK/content-first/pull/237.patch","issue_url":"https://api.github.com/repos/DBCDK/content-first/issues/237","number":237,"state":"open","locked":false,"title":"DISCUSSION: users in state","user":{"login":"rasmuserik","id":496937,"avatar_url":"https://avatars0.githubusercontent.com/u/496937?v=4","gravatar_id":"","url":"https://api.github.com/users/rasmuserik","html_url":"https://github.com/rasmuserik","followers_url":"https://api.github.com/users/rasmuserik/followers","following_url":"https://api.github.com/users/rasmuserik/following{/other_user}","gists_url":"https://api.github.com/users/rasmuserik/gists{/gist_id}","starred_url":"https://api.github.com/users/rasmuserik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasmuserik/subscriptions","organizations_url":"https://api.github.com/users/rasmuserik/orgs","repos_url":"https://api.github.com/users/rasmuserik/repos","events_url":"https://api.github.com/users/rasmuserik/events{/privacy}","received_events_url":"https://api.github.com/users/rasmuserik/received_events","type":"User","site_admin":false},"body":"Users-delen af state'en tænkes at indeholde alle profil-data, og tanken er, at hver gang man i anden middleware henter data, der refererer til en user, så dispatcher man `REQUEST_USER`.\r\n\r\n---\r\n\r\nVi talte for noget tid siden om at refaktorere state, så jeg har det i forbindelse med implementeringen #226, gjort det som det ville være mest naturligt for mig, fremfor helt at matche den eksisterende kodetilgang. Dette er et oplæg til diskussion om hvorledes vi griber redux/state an, - og vil derfor høre hvad i tænker om denne tilgang (ellers skrive jeg det bare om, så det matcher den eksisterende kodestil).\r\n\r\nForskelle fra eksisterende kode:\r\n\r\n- reducer, middleware (og eventuelle selectors) ligger sammen, - hvis de var betydeligt mere komplicerede ville jeg splitte dem op i flere filer. Bruger bare `.js` og ikke `.reducer.js` extension.\r\n- tilstanden hedder `users` i state og ikke `usersReducer`\r\n\r\nBemærk også måden at koden håndterer race-conditions på: Hvis der dispatches flere `REQUEST` actions, undervejs mens den er ved, at hente data fra serveren, laver det ikke rod i tilstanden, - og der er en midlertidig tilstand for som eventuelt kan bruges til vise en load-spinner. Mener at have set i andre dele af koden, at vi kan have race-conditions i ligenende situationer.\r\n","created_at":"2018-02-27T04:38:50Z","updated_at":"2018-02-27T04:38:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DBCDK/content-first/pulls/237/commits","review_comments_url":"https://api.github.com/repos/DBCDK/content-first/pulls/237/comments","review_comment_url":"https://api.github.com/repos/DBCDK/content-first/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DBCDK/content-first/issues/237/comments","statuses_url":"https://api.github.com/repos/DBCDK/content-first/statuses/293fea93b3f4898f841c2a52012d5eef3b858473","head":{"label":"DBCDK:226-users-in-state","ref":"226-users-in-state","sha":"293fea93b3f4898f841c2a52012d5eef3b858473","user":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"repo":{"id":101648591,"name":"content-first","full_name":"DBCDK/content-first","owner":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DBCDK/content-first","description":null,"fork":false,"url":"https://api.github.com/repos/DBCDK/content-first","forks_url":"https://api.github.com/repos/DBCDK/content-first/forks","keys_url":"https://api.github.com/repos/DBCDK/content-first/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBCDK/content-first/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBCDK/content-first/teams","hooks_url":"https://api.github.com/repos/DBCDK/content-first/hooks","issue_events_url":"https://api.github.com/repos/DBCDK/content-first/issues/events{/number}","events_url":"https://api.github.com/repos/DBCDK/content-first/events","assignees_url":"https://api.github.com/repos/DBCDK/content-first/assignees{/user}","branches_url":"https://api.github.com/repos/DBCDK/content-first/branches{/branch}","tags_url":"https://api.github.com/repos/DBCDK/content-first/tags","blobs_url":"https://api.github.com/repos/DBCDK/content-first/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBCDK/content-first/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBCDK/content-first/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBCDK/content-first/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBCDK/content-first/statuses/{sha}","languages_url":"https://api.github.com/repos/DBCDK/content-first/languages","stargazers_url":"https://api.github.com/repos/DBCDK/content-first/stargazers","contributors_url":"https://api.github.com/repos/DBCDK/content-first/contributors","subscribers_url":"https://api.github.com/repos/DBCDK/content-first/subscribers","subscription_url":"https://api.github.com/repos/DBCDK/content-first/subscription","commits_url":"https://api.github.com/repos/DBCDK/content-first/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBCDK/content-first/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBCDK/content-first/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBCDK/content-first/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBCDK/content-first/contents/{+path}","compare_url":"https://api.github.com/repos/DBCDK/content-first/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBCDK/content-first/merges","archive_url":"https://api.github.com/repos/DBCDK/content-first/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBCDK/content-first/downloads","issues_url":"https://api.github.com/repos/DBCDK/content-first/issues{/number}","pulls_url":"https://api.github.com/repos/DBCDK/content-first/pulls{/number}","milestones_url":"https://api.github.com/repos/DBCDK/content-first/milestones{/number}","notifications_url":"https://api.github.com/repos/DBCDK/content-first/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBCDK/content-first/labels{/name}","releases_url":"https://api.github.com/repos/DBCDK/content-first/releases{/id}","deployments_url":"https://api.github.com/repos/DBCDK/content-first/deployments","created_at":"2017-08-28T13:57:33Z","updated_at":"2017-11-13T12:08:56Z","pushed_at":"2018-02-27T04:17:51Z","git_url":"git://github.com/DBCDK/content-first.git","ssh_url":"git@github.com:DBCDK/content-first.git","clone_url":"https://github.com/DBCDK/content-first.git","svn_url":"https://github.com/DBCDK/content-first","homepage":"http://content-first.demo.dbc.dk/","size":14138,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":49,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":49,"watchers":2,"default_branch":"master"}},"base":{"label":"DBCDK:master","ref":"master","sha":"2fed0d1ac33c3802fd73b66e2378195b77091c7c","user":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"repo":{"id":101648591,"name":"content-first","full_name":"DBCDK/content-first","owner":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars0.githubusercontent.com/u/555633?v=4","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DBCDK/content-first","description":null,"fork":false,"url":"https://api.github.com/repos/DBCDK/content-first","forks_url":"https://api.github.com/repos/DBCDK/content-first/forks","keys_url":"https://api.github.com/repos/DBCDK/content-first/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBCDK/content-first/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBCDK/content-first/teams","hooks_url":"https://api.github.com/repos/DBCDK/content-first/hooks","issue_events_url":"https://api.github.com/repos/DBCDK/content-first/issues/events{/number}","events_url":"https://api.github.com/repos/DBCDK/content-first/events","assignees_url":"https://api.github.com/repos/DBCDK/content-first/assignees{/user}","branches_url":"https://api.github.com/repos/DBCDK/content-first/branches{/branch}","tags_url":"https://api.github.com/repos/DBCDK/content-first/tags","blobs_url":"https://api.github.com/repos/DBCDK/content-first/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBCDK/content-first/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBCDK/content-first/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBCDK/content-first/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBCDK/content-first/statuses/{sha}","languages_url":"https://api.github.com/repos/DBCDK/content-first/languages","stargazers_url":"https://api.github.com/repos/DBCDK/content-first/stargazers","contributors_url":"https://api.github.com/repos/DBCDK/content-first/contributors","subscribers_url":"https://api.github.com/repos/DBCDK/content-first/subscribers","subscription_url":"https://api.github.com/repos/DBCDK/content-first/subscription","commits_url":"https://api.github.com/repos/DBCDK/content-first/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBCDK/content-first/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBCDK/content-first/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBCDK/content-first/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBCDK/content-first/contents/{+path}","compare_url":"https://api.github.com/repos/DBCDK/content-first/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBCDK/content-first/merges","archive_url":"https://api.github.com/repos/DBCDK/content-first/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBCDK/content-first/downloads","issues_url":"https://api.github.com/repos/DBCDK/content-first/issues{/number}","pulls_url":"https://api.github.com/repos/DBCDK/content-first/pulls{/number}","milestones_url":"https://api.github.com/repos/DBCDK/content-first/milestones{/number}","notifications_url":"https://api.github.com/repos/DBCDK/content-first/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBCDK/content-first/labels{/name}","releases_url":"https://api.github.com/repos/DBCDK/content-first/releases{/id}","deployments_url":"https://api.github.com/repos/DBCDK/content-first/deployments","created_at":"2017-08-28T13:57:33Z","updated_at":"2017-11-13T12:08:56Z","pushed_at":"2018-02-27T04:17:51Z","git_url":"git://github.com/DBCDK/content-first.git","ssh_url":"git@github.com:DBCDK/content-first.git","clone_url":"https://github.com/DBCDK/content-first.git","svn_url":"https://github.com/DBCDK/content-first","homepage":"http://content-first.demo.dbc.dk/","size":14138,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":49,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":49,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DBCDK/content-first/pulls/237"},"html":{"href":"https://github.com/DBCDK/content-first/pull/237"},"issue":{"href":"https://api.github.com/repos/DBCDK/content-first/issues/237"},"comments":{"href":"https://api.github.com/repos/DBCDK/content-first/issues/237/comments"},"review_comments":{"href":"https://api.github.com/repos/DBCDK/content-first/pulls/237/comments"},"review_comment":{"href":"https://api.github.com/repos/DBCDK/content-first/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DBCDK/content-first/pulls/237/commits"},"statuses":{"href":"https://api.github.com/repos/DBCDK/content-first/statuses/293fea93b3f4898f841c2a52012d5eef3b858473"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":138,"deletions":0,"changed_files":4}}
{"actor":{"display_login":"rasmuserik"}}