{"action":"created","comment":{"url":"https://api.github.com/repos/salsita/redux-side-effects/pulls/comments/47919446","id":47919446,"diff_hunk":"@@ -40,9 +40,21 @@ export const wrapDispatch = store => action => {\n     `It's allowed to yield only functions (side effect)`);\n \n   // Effects are executed after action is dispatched\n-  effects.forEach(effect => effect(wrapDispatch(store)));\n+  const effectPromises = effects.map(effect => {\n+    const effectResult = effect(wrapDispatch(store));\n \n-  return result;\n+    // TODO: this should obviously be something like isThenable\n+    if (!(effectResult instanceof Promise)) {\n+      return new Promise(resolve => resolve(effectResult));\n+    } else {\n+      return effectResult;\n+    }\n+  });\n+\n+  return {\n+    action: result,\n+    effectPromises","path":"src/createEffectCapableStore.js","position":19,"original_position":19,"commit_id":"2f9d818ef29aea0fa10dd2c7b3051b9b31630803","original_commit_id":"2f9d818ef29aea0fa10dd2c7b3051b9b31630803","user":{"login":"calebmer","id":8282507,"avatar_url":"https://avatars.githubusercontent.com/u/8282507?v=3","gravatar_id":"","url":"https://api.github.com/users/calebmer","html_url":"https://github.com/calebmer","followers_url":"https://api.github.com/users/calebmer/followers","following_url":"https://api.github.com/users/calebmer/following{/other_user}","gists_url":"https://api.github.com/users/calebmer/gists{/gist_id}","starred_url":"https://api.github.com/users/calebmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebmer/subscriptions","organizations_url":"https://api.github.com/users/calebmer/orgs","repos_url":"https://api.github.com/users/calebmer/repos","events_url":"https://api.github.com/users/calebmer/events{/privacy}","received_events_url":"https://api.github.com/users/calebmer/received_events","type":"User","site_admin":false},"body":"I really don't like the idea of changing the `dispatch` function in this way. Maybe make another function which returns the results?","created_at":"2015-12-17T15:36:13Z","updated_at":"2015-12-17T15:36:13Z","html_url":"https://github.com/salsita/redux-side-effects/pull/10#discussion_r47919446","pull_request_url":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/salsita/redux-side-effects/pulls/comments/47919446"},"html":{"href":"https://github.com/salsita/redux-side-effects/pull/10#discussion_r47919446"},"pull_request":{"href":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10","id":53978817,"html_url":"https://github.com/salsita/redux-side-effects/pull/10","diff_url":"https://github.com/salsita/redux-side-effects/pull/10.diff","patch_url":"https://github.com/salsita/redux-side-effects/pull/10.patch","issue_url":"https://api.github.com/repos/salsita/redux-side-effects/issues/10","number":10,"state":"open","locked":false,"title":"Effects got promisified","user":{"login":"tomkis1","id":5079224,"avatar_url":"https://avatars.githubusercontent.com/u/5079224?v=3","gravatar_id":"","url":"https://api.github.com/users/tomkis1","html_url":"https://github.com/tomkis1","followers_url":"https://api.github.com/users/tomkis1/followers","following_url":"https://api.github.com/users/tomkis1/following{/other_user}","gists_url":"https://api.github.com/users/tomkis1/gists{/gist_id}","starred_url":"https://api.github.com/users/tomkis1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomkis1/subscriptions","organizations_url":"https://api.github.com/users/tomkis1/orgs","repos_url":"https://api.github.com/users/tomkis1/repos","events_url":"https://api.github.com/users/tomkis1/events{/privacy}","received_events_url":"https://api.github.com/users/tomkis1/received_events","type":"User","site_admin":false},"body":"@calebmer This PR is rough example how promisified effects may help us with server-side render. Further description in https://github.com/salsita/redux-side-effects/pull/9","created_at":"2015-12-17T13:57:57Z","updated_at":"2015-12-17T15:36:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b680e12a1dba7d415210f0eda3aa8db4a8072f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10/commits","review_comments_url":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10/comments","review_comment_url":"https://api.github.com/repos/salsita/redux-side-effects/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salsita/redux-side-effects/issues/10/comments","statuses_url":"https://api.github.com/repos/salsita/redux-side-effects/statuses/2f9d818ef29aea0fa10dd2c7b3051b9b31630803","head":{"label":"salsita:effect-resolving","ref":"effect-resolving","sha":"2f9d818ef29aea0fa10dd2c7b3051b9b31630803","user":{"login":"salsita","id":1357845,"avatar_url":"https://avatars.githubusercontent.com/u/1357845?v=3","gravatar_id":"","url":"https://api.github.com/users/salsita","html_url":"https://github.com/salsita","followers_url":"https://api.github.com/users/salsita/followers","following_url":"https://api.github.com/users/salsita/following{/other_user}","gists_url":"https://api.github.com/users/salsita/gists{/gist_id}","starred_url":"https://api.github.com/users/salsita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salsita/subscriptions","organizations_url":"https://api.github.com/users/salsita/orgs","repos_url":"https://api.github.com/users/salsita/repos","events_url":"https://api.github.com/users/salsita/events{/privacy}","received_events_url":"https://api.github.com/users/salsita/received_events","type":"Organization","site_admin":false},"repo":{"id":46794818,"name":"redux-side-effects","full_name":"salsita/redux-side-effects","owner":{"login":"salsita","id":1357845,"avatar_url":"https://avatars.githubusercontent.com/u/1357845?v=3","gravatar_id":"","url":"https://api.github.com/users/salsita","html_url":"https://github.com/salsita","followers_url":"https://api.github.com/users/salsita/followers","following_url":"https://api.github.com/users/salsita/following{/other_user}","gists_url":"https://api.github.com/users/salsita/gists{/gist_id}","starred_url":"https://api.github.com/users/salsita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salsita/subscriptions","organizations_url":"https://api.github.com/users/salsita/orgs","repos_url":"https://api.github.com/users/salsita/repos","events_url":"https://api.github.com/users/salsita/events{/privacy}","received_events_url":"https://api.github.com/users/salsita/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salsita/redux-side-effects","description":"Redux toolset for keeping all the side effects inside your reducers while maintaining their purity.","fork":false,"url":"https://api.github.com/repos/salsita/redux-side-effects","forks_url":"https://api.github.com/repos/salsita/redux-side-effects/forks","keys_url":"https://api.github.com/repos/salsita/redux-side-effects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salsita/redux-side-effects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salsita/redux-side-effects/teams","hooks_url":"https://api.github.com/repos/salsita/redux-side-effects/hooks","issue_events_url":"https://api.github.com/repos/salsita/redux-side-effects/issues/events{/number}","events_url":"https://api.github.com/repos/salsita/redux-side-effects/events","assignees_url":"https://api.github.com/repos/salsita/redux-side-effects/assignees{/user}","branches_url":"https://api.github.com/repos/salsita/redux-side-effects/branches{/branch}","tags_url":"https://api.github.com/repos/salsita/redux-side-effects/tags","blobs_url":"https://api.github.com/repos/salsita/redux-side-effects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salsita/redux-side-effects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salsita/redux-side-effects/git/refs{/sha}","trees_url":"https://api.github.com/repos/salsita/redux-side-effects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salsita/redux-side-effects/statuses/{sha}","languages_url":"https://api.github.com/repos/salsita/redux-side-effects/languages","stargazers_url":"https://api.github.com/repos/salsita/redux-side-effects/stargazers","contributors_url":"https://api.github.com/repos/salsita/redux-side-effects/contributors","subscribers_url":"https://api.github.com/repos/salsita/redux-side-effects/subscribers","subscription_url":"https://api.github.com/repos/salsita/redux-side-effects/subscription","commits_url":"https://api.github.com/repos/salsita/redux-side-effects/commits{/sha}","git_commits_url":"https://api.github.com/repos/salsita/redux-side-effects/git/commits{/sha}","comments_url":"https://api.github.com/repos/salsita/redux-side-effects/comments{/number}","issue_comment_url":"https://api.github.com/repos/salsita/redux-side-effects/issues/comments{/number}","contents_url":"https://api.github.com/repos/salsita/redux-side-effects/contents/{+path}","compare_url":"https://api.github.com/repos/salsita/redux-side-effects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salsita/redux-side-effects/merges","archive_url":"https://api.github.com/repos/salsita/redux-side-effects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salsita/redux-side-effects/downloads","issues_url":"https://api.github.com/repos/salsita/redux-side-effects/issues{/number}","pulls_url":"https://api.github.com/repos/salsita/redux-side-effects/pulls{/number}","milestones_url":"https://api.github.com/repos/salsita/redux-side-effects/milestones{/number}","notifications_url":"https://api.github.com/repos/salsita/redux-side-effects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salsita/redux-side-effects/labels{/name}","releases_url":"https://api.github.com/repos/salsita/redux-side-effects/releases{/id}","created_at":"2015-11-24T13:54:18Z","updated_at":"2015-12-17T01:11:34Z","pushed_at":"2015-12-17T13:57:58Z","git_url":"git://github.com/salsita/redux-side-effects.git","ssh_url":"git@github.com:salsita/redux-side-effects.git","clone_url":"https://github.com/salsita/redux-side-effects.git","svn_url":"https://github.com/salsita/redux-side-effects","homepage":"","size":27,"stargazers_count":71,"watchers_count":71,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":71,"default_branch":"master"}},"base":{"label":"salsita:master","ref":"master","sha":"0490dee9c64f77200c692790a0c885b695e68472","user":{"login":"salsita","id":1357845,"avatar_url":"https://avatars.githubusercontent.com/u/1357845?v=3","gravatar_id":"","url":"https://api.github.com/users/salsita","html_url":"https://github.com/salsita","followers_url":"https://api.github.com/users/salsita/followers","following_url":"https://api.github.com/users/salsita/following{/other_user}","gists_url":"https://api.github.com/users/salsita/gists{/gist_id}","starred_url":"https://api.github.com/users/salsita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salsita/subscriptions","organizations_url":"https://api.github.com/users/salsita/orgs","repos_url":"https://api.github.com/users/salsita/repos","events_url":"https://api.github.com/users/salsita/events{/privacy}","received_events_url":"https://api.github.com/users/salsita/received_events","type":"Organization","site_admin":false},"repo":{"id":46794818,"name":"redux-side-effects","full_name":"salsita/redux-side-effects","owner":{"login":"salsita","id":1357845,"avatar_url":"https://avatars.githubusercontent.com/u/1357845?v=3","gravatar_id":"","url":"https://api.github.com/users/salsita","html_url":"https://github.com/salsita","followers_url":"https://api.github.com/users/salsita/followers","following_url":"https://api.github.com/users/salsita/following{/other_user}","gists_url":"https://api.github.com/users/salsita/gists{/gist_id}","starred_url":"https://api.github.com/users/salsita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salsita/subscriptions","organizations_url":"https://api.github.com/users/salsita/orgs","repos_url":"https://api.github.com/users/salsita/repos","events_url":"https://api.github.com/users/salsita/events{/privacy}","received_events_url":"https://api.github.com/users/salsita/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salsita/redux-side-effects","description":"Redux toolset for keeping all the side effects inside your reducers while maintaining their purity.","fork":false,"url":"https://api.github.com/repos/salsita/redux-side-effects","forks_url":"https://api.github.com/repos/salsita/redux-side-effects/forks","keys_url":"https://api.github.com/repos/salsita/redux-side-effects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salsita/redux-side-effects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salsita/redux-side-effects/teams","hooks_url":"https://api.github.com/repos/salsita/redux-side-effects/hooks","issue_events_url":"https://api.github.com/repos/salsita/redux-side-effects/issues/events{/number}","events_url":"https://api.github.com/repos/salsita/redux-side-effects/events","assignees_url":"https://api.github.com/repos/salsita/redux-side-effects/assignees{/user}","branches_url":"https://api.github.com/repos/salsita/redux-side-effects/branches{/branch}","tags_url":"https://api.github.com/repos/salsita/redux-side-effects/tags","blobs_url":"https://api.github.com/repos/salsita/redux-side-effects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salsita/redux-side-effects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salsita/redux-side-effects/git/refs{/sha}","trees_url":"https://api.github.com/repos/salsita/redux-side-effects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salsita/redux-side-effects/statuses/{sha}","languages_url":"https://api.github.com/repos/salsita/redux-side-effects/languages","stargazers_url":"https://api.github.com/repos/salsita/redux-side-effects/stargazers","contributors_url":"https://api.github.com/repos/salsita/redux-side-effects/contributors","subscribers_url":"https://api.github.com/repos/salsita/redux-side-effects/subscribers","subscription_url":"https://api.github.com/repos/salsita/redux-side-effects/subscription","commits_url":"https://api.github.com/repos/salsita/redux-side-effects/commits{/sha}","git_commits_url":"https://api.github.com/repos/salsita/redux-side-effects/git/commits{/sha}","comments_url":"https://api.github.com/repos/salsita/redux-side-effects/comments{/number}","issue_comment_url":"https://api.github.com/repos/salsita/redux-side-effects/issues/comments{/number}","contents_url":"https://api.github.com/repos/salsita/redux-side-effects/contents/{+path}","compare_url":"https://api.github.com/repos/salsita/redux-side-effects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salsita/redux-side-effects/merges","archive_url":"https://api.github.com/repos/salsita/redux-side-effects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salsita/redux-side-effects/downloads","issues_url":"https://api.github.com/repos/salsita/redux-side-effects/issues{/number}","pulls_url":"https://api.github.com/repos/salsita/redux-side-effects/pulls{/number}","milestones_url":"https://api.github.com/repos/salsita/redux-side-effects/milestones{/number}","notifications_url":"https://api.github.com/repos/salsita/redux-side-effects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salsita/redux-side-effects/labels{/name}","releases_url":"https://api.github.com/repos/salsita/redux-side-effects/releases{/id}","created_at":"2015-11-24T13:54:18Z","updated_at":"2015-12-17T01:11:34Z","pushed_at":"2015-12-17T13:57:58Z","git_url":"git://github.com/salsita/redux-side-effects.git","ssh_url":"git@github.com:salsita/redux-side-effects.git","clone_url":"https://github.com/salsita/redux-side-effects.git","svn_url":"https://github.com/salsita/redux-side-effects","homepage":"","size":27,"stargazers_count":71,"watchers_count":71,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10"},"html":{"href":"https://github.com/salsita/redux-side-effects/pull/10"},"issue":{"href":"https://api.github.com/repos/salsita/redux-side-effects/issues/10"},"comments":{"href":"https://api.github.com/repos/salsita/redux-side-effects/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/salsita/redux-side-effects/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salsita/redux-side-effects/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/salsita/redux-side-effects/statuses/2f9d818ef29aea0fa10dd2c7b3051b9b31630803"}}}}