{"action":"created","issue":{"url":"https://api.github.com/repos/f2etw/weekly-collection/issues/63","repository_url":"https://api.github.com/repos/f2etw/weekly-collection","labels_url":"https://api.github.com/repos/f2etw/weekly-collection/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/f2etw/weekly-collection/issues/63/comments","events_url":"https://api.github.com/repos/f2etw/weekly-collection/issues/63/events","html_url":"https://github.com/f2etw/weekly-collection/issues/63","id":154915269,"number":63,"title":"week - 2016-05-15 ~ 2016-05-21","user":{"login":"Rplus","id":1808835,"avatar_url":"https://avatars.githubusercontent.com/u/1808835?v=3","gravatar_id":"","url":"https://api.github.com/users/Rplus","html_url":"https://github.com/Rplus","followers_url":"https://api.github.com/users/Rplus/followers","following_url":"https://api.github.com/users/Rplus/following{/other_user}","gists_url":"https://api.github.com/users/Rplus/gists{/gist_id}","starred_url":"https://api.github.com/users/Rplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rplus/subscriptions","organizations_url":"https://api.github.com/users/Rplus/orgs","repos_url":"https://api.github.com/users/Rplus/repos","events_url":"https://api.github.com/users/Rplus/events{/privacy}","received_events_url":"https://api.github.com/users/Rplus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/f2etw/weekly-collection/labels/%E9%80%B1%E5%88%8A","name":"週刊","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-05-15T15:51:14Z","updated_at":"2016-05-26T13:53:38Z","closed_at":null,"body":"收集：05-26\r\n票選：05-?? ~ 05-??"},"comment":{"url":"https://api.github.com/repos/f2etw/weekly-collection/issues/comments/221877119","html_url":"https://github.com/f2etw/weekly-collection/issues/63#issuecomment-221877119","issue_url":"https://api.github.com/repos/f2etw/weekly-collection/issues/63","id":221877119,"user":{"login":"Rplus","id":1808835,"avatar_url":"https://avatars.githubusercontent.com/u/1808835?v=3","gravatar_id":"","url":"https://api.github.com/users/Rplus","html_url":"https://github.com/Rplus","followers_url":"https://api.github.com/users/Rplus/followers","following_url":"https://api.github.com/users/Rplus/following{/other_user}","gists_url":"https://api.github.com/users/Rplus/gists{/gist_id}","starred_url":"https://api.github.com/users/Rplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rplus/subscriptions","organizations_url":"https://api.github.com/users/Rplus/orgs","repos_url":"https://api.github.com/users/Rplus/repos","events_url":"https://api.github.com/users/Rplus/events{/privacy}","received_events_url":"https://api.github.com/users/Rplus/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T13:53:38Z","updated_at":"2016-05-26T13:53:38Z","body":"\r\n| power# | likes | comments | shares |\r\n|:------:|:-----:|:--------:|:------:|\r\n| # 13 | 80 | 0 | 4 |\r\n* [fb permalink](https://fb.com/521085554595481_998027116901320) @ `2016-05-16T07:51:50+0000`\r\n* who: [Denny Ku](https://facebook.com/841989239187866)  \r\n![](https://graph.facebook.com/841989239187866/picture?width=60&height=60)\r\n* intro:\r\n```\r\nHi 大家，redux-saga 最近很紅。\r\n因為它能幫我們把非同步的資料流變得好測試以及維護。\r\n其實 Saga 不是太複雜的概念，沒必要被這個單字嚇到了，\r\n簡單的說：一個好的 UX 流程應該是一個 transaction，\r\n同時這個資料流也必須有辦法被中斷及重來。\r\n（舉例：登入 => 登入中 => 登入完成，中間要可以取消登入）\r\n乍看之下有點矛盾，但這就是 saga 要解決的問題 XD\r\n我認為這對前端開發者來說，帶來了很不同的思考角度。\r\npromise 不能 abort 的特性其實為我們的測試和開發彈性都帶來一些問題。\r\nSaga 是我目前看到覺得最合理的解決方式，\r\n不過只講述工具怎麼使用不是一件健康的事情，\r\n尤其是在工具動不動就 deprecated 的前端生態圈，\r\n所以我想分享一下 saga 這個 pattern的概念以及如何應用。\r\n裡面除了講述概念以外，\r\n還包含一個如何從 redux-thunk 重構到 redux-saga ，\r\n最後再加入取消功能的實際案例：\r\n```\r\n> ![](https://www.facebook.com/images/icons/post.gif): [Saga Pattern 在前端的應用 · De-bug: 一鍵跑版](http://abalone0204.github.io/2016/05/14/redux-saga/)\r\n> Saga Pattern 在前端的應用 - Tsung-Chen Ku\r\n> ![](https://external.xx.fbcdn.net/safe_image.php?d=AQAg54hCpB1WGyKR&w=130&h=130&url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fzh%2F3%2F37%2FAdventure_Time_-_Title_card.png&cfs=1)"}}
{"actor":{"display_login":"Rplus"}}