{"action":"created","issue":{"url":"https://api.github.com/repos/staltz/cycle-onionify/issues/21","repository_url":"https://api.github.com/repos/staltz/cycle-onionify","labels_url":"https://api.github.com/repos/staltz/cycle-onionify/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/staltz/cycle-onionify/issues/21/comments","events_url":"https://api.github.com/repos/staltz/cycle-onionify/issues/21/events","html_url":"https://github.com/staltz/cycle-onionify/issues/21","id":221828822,"number":21,"title":"order of drivers has impact","user":{"login":"RoelVanderPaal","id":5472783,"avatar_url":"https://avatars3.githubusercontent.com/u/5472783?v=3","gravatar_id":"","url":"https://api.github.com/users/RoelVanderPaal","html_url":"https://github.com/RoelVanderPaal","followers_url":"https://api.github.com/users/RoelVanderPaal/followers","following_url":"https://api.github.com/users/RoelVanderPaal/following{/other_user}","gists_url":"https://api.github.com/users/RoelVanderPaal/gists{/gist_id}","starred_url":"https://api.github.com/users/RoelVanderPaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoelVanderPaal/subscriptions","organizations_url":"https://api.github.com/users/RoelVanderPaal/orgs","repos_url":"https://api.github.com/users/RoelVanderPaal/repos","events_url":"https://api.github.com/users/RoelVanderPaal/events{/privacy}","received_events_url":"https://api.github.com/users/RoelVanderPaal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-14T15:16:16Z","updated_at":"2017-04-18T08:41:26Z","closed_at":null,"body":"In this code example, the `log` driver only receives the second 'b' event:\r\n\r\n```\r\nimport {run} from '@cycle/run'\r\nimport {makeDOMDriver} from '@cycle/dom'\r\nimport onionify from 'cycle-onionify';\r\nimport {div} from '@cycle/dom'\r\nimport xs from 'xstream'\r\n\r\nfunction App(sources) {\r\n\tconst state$ = sources.onion.state$;\r\n\r\n\tconst init_reducer$ = xs.of(s => 'a');\r\n\r\n\tconst change_a_to_b_reducer$ = state$\r\n\t\t.filter(s => s === 'a')\r\n\t\t.map(() => s => 'b');\r\n\r\n\treturn {\r\n\t\tDOM: state$.map(s => div(s)),\r\n\t\tonion: xs.merge(init_reducer$, change_a_to_b_reducer$),\r\n\t\tlog: state$,\r\n\t}\r\n}\r\n\r\n\r\nconst main = App;\r\n\r\nconst wrappedMain = onionify(main);\r\n\r\nconst drivers = {\r\n\tDOM: makeDOMDriver('#app'),\r\n\tlog: msg$ => {\r\n\t\tmsg$.addListener({next: i => console.log('passthrough', i)})\r\n\t},\r\n};\r\n\r\nrun(wrappedMain, drivers);\r\n```\r\n\r\nBut when I change the order of the drivers, both 'a' and 'b' event are logged:\r\n```\r\n\treturn {\r\n\t\tlog: state$,\r\n\t\tDOM: state$.map(s => div(s)),\r\n\t\tonion: xs.merge(init_reducer$, change_a_to_b_reducer$),\r\n\t}\r\n```\r\n\r\nSo apparently the order of the drivers has impact. I have the same problem when using the HTTP driver.\r\nThank you for your help!\r\n"},"comment":{"url":"https://api.github.com/repos/staltz/cycle-onionify/issues/comments/294731828","html_url":"https://github.com/staltz/cycle-onionify/issues/21#issuecomment-294731828","issue_url":"https://api.github.com/repos/staltz/cycle-onionify/issues/21","id":294731828,"user":{"login":"RoelVanderPaal","id":5472783,"avatar_url":"https://avatars3.githubusercontent.com/u/5472783?v=3","gravatar_id":"","url":"https://api.github.com/users/RoelVanderPaal","html_url":"https://github.com/RoelVanderPaal","followers_url":"https://api.github.com/users/RoelVanderPaal/followers","following_url":"https://api.github.com/users/RoelVanderPaal/following{/other_user}","gists_url":"https://api.github.com/users/RoelVanderPaal/gists{/gist_id}","starred_url":"https://api.github.com/users/RoelVanderPaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoelVanderPaal/subscriptions","organizations_url":"https://api.github.com/users/RoelVanderPaal/orgs","repos_url":"https://api.github.com/users/RoelVanderPaal/repos","events_url":"https://api.github.com/users/RoelVanderPaal/events{/privacy}","received_events_url":"https://api.github.com/users/RoelVanderPaal/received_events","type":"User","site_admin":false},"created_at":"2017-04-18T08:41:26Z","updated_at":"2017-04-18T08:41:26Z","body":"possibly related to #17 ?"}}
{"actor":{"display_login":"RoelVanderPaal"}}