You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
redux-sagaの動きを調べた。 redux-sagaは redux-sagaで非同期処理と戦うで説明されているように、非同期処理などを直列プログラムのような形式(直接形式; direct style) で書くためのライブラリである。 そのためにタスクを導入し、その切り替えを制御している。 複数のタスクを協調制御するという点で、コルーチンや軽量スレッド、fiberなどに類似していると感じた。 🔎対象 redux-saga v0.15.3を対象とする。ただし一部コードは説明のためにエラー処理や終了処理を省略する。 また counter-vanilla を元にした以下のプログラムの動きを追う。 // counter.js ////////////////////////////////////////////////////////////////////////// // Reduce
Data Flow with Redux and Redux-Saga (proposal)I really love the principles I learned after switching from AngularJs to React and its Flux architecture. At the moment I’m working on a real world application for another company. After my first React-Native App with Redux, I decided to add Redux-Saga to the mix. Complex transactions and side effects should be readable and easy to maintain too. This b
こんにちは。エンジニアの吉田です。 2017年1月27日(金)に開催された社内勉強会#21で、『実践 Redux Saga』というお話をしたのでブログにもまとめたいと思います。 スライドはこちら。(Slideshareにアップするとフォントが欠落してイマイチな見た目になってまう…) 要約 プロダクションの案件でRedux Sagaを導入したのでそのお話 Redux Sagaの話の前に、jQuery、React、FLUX、Redux をおさらい Redux Sagaを使うと非同期処理を取り扱えるが、その反面、データフローが複雑になる System&User Action と Reducer Action を分けることで複雑性を軽減した Action の命名規則、React, Redux, Redux Saga の責務を明確にするガイドラインをつくった みなさまがより快適なフロントエンドライフ
はじめに React #1 Advent Calendar 2017の11日目です。 Reduxのミドルウェア「Redux-saga」で「やや複雑なリアルタイムゲーム」としてテトリス風のゲームの基本部分を開発し、それを通じて学んだこと・感じたことを紹介します。 画面例 まずは実装したテトリス風ゲームの画面例。矢印キーの左右下でピースを動かし、z,xで回転です。 実際にこちらから遊べます。ソースコードはこちらから。 テトリス風ゲーム実装を通じて学んだこと Redux-Sagaの効用として良く言われるのは、「作用を分離する」とか「テストを簡単にする」ということです。それ以外に、今回、ゲームの実装を通じて思ったこと、思いついたことをつらつらと書いていきたいと思います。 利点1. ビューからビジネスロジックを分離する 利点2. ロジックとロジックの間を疎結合にする 利点3. ロジックフローの明確化
This suggestion has a few pieces: Implement boolean literal types for true and false, in a fashion similar to Singleton types under the form of string literal types #1003 Implement type guards for booleans. Essentially, control flow constructs like if-else, while, for, etc would be subject to a type guard if their guard expression is a boolean. Now we can update generators to have a next method th
{ "title": "Bitbucket Browser", "baseUrl": "/bitbucket-browser/bitbucket", "linkBaseUrl": "http://your-bitbucket-host/bitbucket", "debug": false, "items": { "project": { "displayName": "Project" }, "repo": { "displayName": "Repository" }, "branch": { "displayName": "Branch" }, "branchAuthor": { "enabled": false, "displayName": "Branch Author" }, "branchCreated": { "enabled": true, "displayName": "
Project Tofino is a browser interaction experiment. The kinds of things we use browsers for on PCs and mobile devices are different than they were when the current "tabs across the top" browsers were designed. We believe we can do a lot better by focusing on the tasks and activities users engage browsers for. Project Tofino is one of our explorations. This project is extremely immature. It's curre
Don’t fall into the trap of thinking a library should prescribe how to do everything. If you want to do something with a timeout in JavaScript, you need to use setTimeout. There is no reason why Redux actions should be any different. Redux does offer some alternative ways of dealing with asynchronous stuff, but you should only use those when you realize you are repeating too much code. Unless you
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く