{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/redux/issues/343","labels_url":"https://api.github.com/repos/gaearon/redux/issues/343/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/redux/issues/343/comments","events_url":"https://api.github.com/repos/gaearon/redux/issues/343/events","html_url":"https://github.com/gaearon/redux/issues/343","id":97687251,"number":343,"title":"Investigate Cerebral","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gaearon/redux/labels/discussion","name":"discussion","color":"fbca04"},{"url":"https://api.github.com/repos/gaearon/redux/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-07-28T11:56:30Z","updated_at":"2015-08-01T21:49:09Z","closed_at":null,"body":"[Cerebral](https://github.com/christianalfoni/cerebral) by @christianalfoni seems very interesting.\r\n\r\n[People say:](https://twitter.com/InfiniteDream01)\r\n\r\n>sticking with cerebral. Signals concept is a winner! Latest update is even more flexible.\r\n\r\nIs there something we can bring to Redux from Cerebral?"},"comment":{"url":"https://api.github.com/repos/gaearon/redux/issues/comments/126955857","html_url":"https://github.com/gaearon/redux/issues/343#issuecomment-126955857","issue_url":"https://api.github.com/repos/gaearon/redux/issues/343","id":126955857,"user":{"login":"christianalfoni","id":3956929,"avatar_url":"https://avatars.githubusercontent.com/u/3956929?v=3","gravatar_id":"","url":"https://api.github.com/users/christianalfoni","html_url":"https://github.com/christianalfoni","followers_url":"https://api.github.com/users/christianalfoni/followers","following_url":"https://api.github.com/users/christianalfoni/following{/other_user}","gists_url":"https://api.github.com/users/christianalfoni/gists{/gist_id}","starred_url":"https://api.github.com/users/christianalfoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christianalfoni/subscriptions","organizations_url":"https://api.github.com/users/christianalfoni/orgs","repos_url":"https://api.github.com/users/christianalfoni/repos","events_url":"https://api.github.com/users/christianalfoni/events{/privacy}","received_events_url":"https://api.github.com/users/christianalfoni/received_events","type":"User","site_admin":false},"created_at":"2015-08-01T21:49:09Z","updated_at":"2015-08-01T21:49:09Z","body":"@vladap You make a very good point on the signals of Cerebral being an implementation that can describe flow good enough. You always meet some conditionals and currently the Cerebral signal implementation can branch out the result of async actions. So if async action(s) resolve, you can go down the resolve path with actions, or down the reject path with different actions.\r\n\r\n```js\r\ncerebral.signal('appMounted', [getUsers, getProjects, getTasks, {\r\n  resolve: [setUsers, setProjects, setTasks],\r\n  reject: [setError]\r\n}]);\r\n```\r\n\r\nA Cerebral signal is actually just a list of functions really. So a replay is basically just passing in the same initial argument to the signal and run the functions again. But there is special handling of async functions, one part storing their resolved/rejected value so in a replay it skips running the function and just resolves/rejects immediately."}}