{"action":"created","issue":{"url":"https://api.github.com/repos/ngReact/ngReact/issues/162","repository_url":"https://api.github.com/repos/ngReact/ngReact","labels_url":"https://api.github.com/repos/ngReact/ngReact/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/ngReact/ngReact/issues/162/comments","events_url":"https://api.github.com/repos/ngReact/ngReact/issues/162/events","html_url":"https://github.com/ngReact/ngReact/pull/162","id":170993083,"number":162,"title":"Flux dispatcher support","user":{"login":"lifeofcoding","id":2482593,"avatar_url":"https://avatars.githubusercontent.com/u/2482593?v=3","gravatar_id":"","url":"https://api.github.com/users/lifeofcoding","html_url":"https://github.com/lifeofcoding","followers_url":"https://api.github.com/users/lifeofcoding/followers","following_url":"https://api.github.com/users/lifeofcoding/following{/other_user}","gists_url":"https://api.github.com/users/lifeofcoding/gists{/gist_id}","starred_url":"https://api.github.com/users/lifeofcoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifeofcoding/subscriptions","organizations_url":"https://api.github.com/users/lifeofcoding/orgs","repos_url":"https://api.github.com/users/lifeofcoding/repos","events_url":"https://api.github.com/users/lifeofcoding/events{/privacy}","received_events_url":"https://api.github.com/users/lifeofcoding/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-13T04:59:22Z","updated_at":"2016-08-14T18:44:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ngReact/ngReact/pulls/162","html_url":"https://github.com/ngReact/ngReact/pull/162","diff_url":"https://github.com/ngReact/ngReact/pull/162.diff","patch_url":"https://github.com/ngReact/ngReact/pull/162.patch"},"body":"I personally love to use ngReact with Flux's Dispatcher & Event Emitter for my hybrid Angular Apps at work to get the best of both worlds. This simply includes the Flux Dispatcher & Event Emitter pre-bundled to include their full functionality, and a tiny edit in ngReact to hook into the dispatcher to automatically call `$digest` on event dispatches, so the user doesn't have to do this themselves on all their callbacks/stores.\r\n\r\nI went with passing callbacks & methods as props at first, but this feels so much better when adding a hybrid ngReact component to my Angular apps, in keeping with the spirit of unidirectional data flow, for these components specifically.\r\n\r\nIf you like this idea, and want it included, let me know if you would rather have a separate file/build that includes Flux Dispatcher & Event Emitter bundled, and one without (Vanilla ngReact). This way the user can decide if they would like to use ngReact with Flux Dispatcher, if they want to use this functionality in combination with ngReact, or without.\r\n\r\nSince I love this combination, and I think others would like it too, I put this together, and added the hook, because I would love to be able to install ngReact with bower on my projects, and it automatically keep data-binding working correctly when dispatching events from my components to my controllers/modules, without having to call `$digest` in all my stores or callbacks.\r\n\r\nThank you for this wonderful Angular module!"},"comment":{"url":"https://api.github.com/repos/ngReact/ngReact/issues/comments/239689305","html_url":"https://github.com/ngReact/ngReact/pull/162#issuecomment-239689305","issue_url":"https://api.github.com/repos/ngReact/ngReact/issues/162","id":239689305,"user":{"login":"lifeofcoding","id":2482593,"avatar_url":"https://avatars.githubusercontent.com/u/2482593?v=3","gravatar_id":"","url":"https://api.github.com/users/lifeofcoding","html_url":"https://github.com/lifeofcoding","followers_url":"https://api.github.com/users/lifeofcoding/followers","following_url":"https://api.github.com/users/lifeofcoding/following{/other_user}","gists_url":"https://api.github.com/users/lifeofcoding/gists{/gist_id}","starred_url":"https://api.github.com/users/lifeofcoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifeofcoding/subscriptions","organizations_url":"https://api.github.com/users/lifeofcoding/orgs","repos_url":"https://api.github.com/users/lifeofcoding/repos","events_url":"https://api.github.com/users/lifeofcoding/events{/privacy}","received_events_url":"https://api.github.com/users/lifeofcoding/received_events","type":"User","site_admin":false},"created_at":"2016-08-14T18:44:11Z","updated_at":"2016-08-14T18:44:11Z","body":"@kasperp I also wanted to mention, I was going to just add node's event emitter, and flux to the `package.json` file, and just require it in `ngReact.js` and run Browserify over it in the build task.. but realized you are building it a bit different, and the build task really just runs Uglify, and using Browserify over ngReact currently ends up includes Angular, etc.. in the bundled result, because of lines 10-21, wasn't sure of the reasoning for this, and didn't want to change the way you build, or do things too much, which is why I included Node Event Emitter, and Flux Dispatcher in the source."}}
{"actor":{"display_login":"lifeofcoding"}}