{"action":"created","issue":{"url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services/issues/1","repository_url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services","labels_url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services/issues/1/comments","events_url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services/issues/1/events","html_url":"https://github.com/eddyystop/feathers-reduxify-services/issues/1","id":170815030,"number":1,"title":".on logic executes twice","user":{"login":"mishoboss","id":1629929,"avatar_url":"https://avatars.githubusercontent.com/u/1629929?v=3","gravatar_id":"","url":"https://api.github.com/users/mishoboss","html_url":"https://github.com/mishoboss","followers_url":"https://api.github.com/users/mishoboss/followers","following_url":"https://api.github.com/users/mishoboss/following{/other_user}","gists_url":"https://api.github.com/users/mishoboss/gists{/gist_id}","starred_url":"https://api.github.com/users/mishoboss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishoboss/subscriptions","organizations_url":"https://api.github.com/users/mishoboss/orgs","repos_url":"https://api.github.com/users/mishoboss/repos","events_url":"https://api.github.com/users/mishoboss/events{/privacy}","received_events_url":"https://api.github.com/users/mishoboss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-12T07:36:11Z","updated_at":"2016-08-12T12:41:22Z","closed_at":null,"body":"Hello and congrats about this great module. Maybe I don't quite understand it, but this snippet logs twice 'PAGE CREATED' when a new page record is created. Is this normal? If yes, why?\r\n\r\n\r\n```\r\nfeathersApp.service('pages').on('created', data => { getStore().dispatch(\r\n       services.pages.on('created', data, (event, data, dispatch, getState) => {\r\n         console.log('PAGE CREATED', data)\r\n       })\r\n   ); \r\n});\r\n```\r\n\r\nAnd one question - is there a mechanism to keep in sync data in redux store with the feathers services? Whenever some client modifies some data, all connected clients to update its own redux store (without requesting the whole data again)? If there isn't such built-in functionality, do you plan it in future? And how to achieve it now best?\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services/issues/comments/239435718","html_url":"https://github.com/eddyystop/feathers-reduxify-services/issues/1#issuecomment-239435718","issue_url":"https://api.github.com/repos/eddyystop/feathers-reduxify-services/issues/1","id":239435718,"user":{"login":"mishoboss","id":1629929,"avatar_url":"https://avatars.githubusercontent.com/u/1629929?v=3","gravatar_id":"","url":"https://api.github.com/users/mishoboss","html_url":"https://github.com/mishoboss","followers_url":"https://api.github.com/users/mishoboss/followers","following_url":"https://api.github.com/users/mishoboss/following{/other_user}","gists_url":"https://api.github.com/users/mishoboss/gists{/gist_id}","starred_url":"https://api.github.com/users/mishoboss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishoboss/subscriptions","organizations_url":"https://api.github.com/users/mishoboss/orgs","repos_url":"https://api.github.com/users/mishoboss/repos","events_url":"https://api.github.com/users/mishoboss/events{/privacy}","received_events_url":"https://api.github.com/users/mishoboss/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T12:41:22Z","updated_at":"2016-08-12T12:41:22Z","body":"> (1) I uncommented the messages.on code in example/client/feathers/index.js:15-25. Its functionally identical to your code above.\r\n\r\nI think maybe you have a mistake here. Line 15 is this one:\r\n`export const services = reduxifyServices(app, ['users', 'messages']);`\r\n\r\n\r\n\r\nCan I execute some redux actions on server events like \"created\", \"deleted\", etc.? For example on message create to call `services.pages.create(data)` and this to store a new record in redux?"}}
{"actor":{"display_login":"mishoboss"}}