Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

With redux-logic, you have the freedom to write your logic in your favorite JS style: plain callback code - dispatch(resultAction) promises - return axios.get(url).then(...) async/await - result = await fetch(url) observables - ob$.next(action1) Use the type of code you and your team are comfortable and experienced with. Leverage powerful declarative features by simply setting properties: filterin
最近redux-sagaについて調べていたのだが、用語の理解が曖昧だったので公式ドキュメントのGlossaryを雑に訳してみた。 Effect effectとはsaga middlewareによって実行される命令を含むプレーンなJavaScriptオブジェクトです。 redux-sagaライブラリが提供するファクトリ関数を使うことでeffectを生成できます。 例えば、call(myfunc, 'arg1', 'arg2')が返すeffectをyieldすることによって、middlewareに対してmyfunc('arg1', 'arg2')を呼び出して結果をGeneratorに返すよう指示します。 Task taskはバックグランドで走るプロセスのようなもので、redux-sagaを使ったアプリケーションでは複数のtaskが並列に動作します。fork関数を使うと下記のようにtaskを生成
Web アプリを構築したくて久し振りに React を触ってみると、前に少し触っていたのにすっかり忘れてしまっていました。圧倒的に記憶力が低いので、継続的に触っていないと中々覚えられません…。 今だと Angular2 がグイグイ来てたりしてますが、それよりも一度触ったことのある React+Redux を使った方が学習コストを抑えられるな、という訳で再度勉強中です。 改めて色々と調べていると、redux-sagaという Redux の Middleware が非同期処理を書きやすく出来るぞ!との事だったので、まずはシンプルなカウンターサンプルの実装をして感じを掴んでいきたいと思います。 最後の 参考 にもあげていますが、そもそも redux-saga とは一体何者なんだ?というところにおいて、以下の記事が大変参考になりました。 redux-saga で非同期処理と戦う - Qiita ま
In this article I share my confusion and findings about Saga pattern. I’m not an expert in Saga or any other mentioned concepts. Recently I’ve been looking into a popular JavaScript library for handling complex asynchronous data flows in React.js applications built with Redux state management library which is called redux-saga. The way it works is very much similar to CSP (Communicating Sequential
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? はじめに ReduxはSingle Store、immutableなState、副作用のないReducerという3つの原則を掲げたFluxフレームワークです。しかし他のフレームワークと違って提供しているものは最小限で、とてもフルスタックとは言えない薄さです。そのためすべてにおいて定番と言える書き方が定まっているわけでもなく、どうしようか迷ってしまうことも少なくありません。その筆頭とも言えるのが 非同期処理 の扱いです。コミュニティでは今でもさまざまな方向に模索が続いていますが、よく使われているものだとredux-thunk、redux-
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く