Account Suspended This Account has been suspended. Contact your hosting provider for more information.
Account Suspended This Account has been suspended. Contact your hosting provider for more information.
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? RxJSの基本をまとめてみた~基本的な概念編~ Angularで使用していたRxJSだが、もっと深くちゃんと理解しようと思い学習したので、これから何回かに分けてまとめる。 仕組みを理解するために、ちょっと冗長な書き方をするところがある。 「これどうなの?」とか「意訳おかしくね?」という部分があったら、ご指摘いただけるとありがたいです。 今回の範囲 今回は、RxJSやリアクティブプログラミングの基本的な概念である、データストリーム、Observable、Observer、Subscription関連についてまとめたいと思う。 今回は、Rx
Every developer knows state management is difficult. Continuously keeping track of what has been updated, why, and… Every developer knows state management is difficult. Continually keeping track of what has been updated, why and when, can become a nightmare, especially in large applications. In the Angular world, several solutions can make state management less painful, complicated, and brittle. T
この記事は bouzuya's RxJS Advent Calendar 2015 の 2 日目かつ RxJS Advent Calendar 2015 の 2 日目です。 はじめに 今日の内容は公式リポジトリにあるドキュメント Exploring The Major Concepts in RxJS とほとんど同じものです。 また RxJS 4.0.7 を対象にしています。 Obervable と Observer RxJS における最も基本的なクラス Observable / Observer の概要を確認します。 Observable はデータソースを表すクラスで、名前どおり observe できる何かです。Observable からデータを受け取るには subscribe(observer) メソッドを呼び出します (メソッド名は observe ではありません) 。subscri
RxJavaではObservableでExceptionが発生した場合、デフォルトではそのObservableを監視しているObserverのonErrorメソッドが実行され、出力元のObservableが終了します。 想定外のエラーが発生して処理を続行することが困難な場合はonErrorで適切な後処理をしてやればよいですが、想定されたエラーの場合はエラーをハンドリングして別の処理に分岐させたいというケースもよくあるかと思います。 今回はRxJavaのonError以外のエラーハンドリングメソッドを試して、それぞれのメソッドごとの違いを理解することでエラーをより柔軟に扱う方法を学んでみます。 Catch Operator onError onErrorReturn onErrorResumeNext onExceptionResumeNext 参考 Catch Operator RxJav
この記事は bouzuya's RxJS Advent Calendar 2015 の 9 日目かつ RxJS Advent Calendar 2015 の 9 日目です。 はじめに 今日は ReactiveX の Observable Utility Operators について RxJS の API ドキュメントやサンプルコードを書いていきます。 また RxJS 4.0.7 を対象にしています。 Observable Utility Operators Observable.prototype.subscribe ReactiveX - Subscribe operator Observable.prototype.subscribe API Document Observable.prototype.subscribe Source Code リスト上は subscribe が挙げら
import React from 'react' import ReactDom from 'react-dom' import { createStore, applyMiddleware } from 'redux' import { createEpicMiddleware } from 'redux-observable' import { connect, Provider } from 'react-redux' // rxjsハマり部分。後述 import 'rxjs/add/operator/mapTo' import 'rxjs/add/operator/filter' import 'rxjs/add/operator/delay' // sampleにあるreducer const pingReducer = (state = { isPinging: false
@laco0416 です。今回はHttpモジュールの機能を眺め、アプリケーション中で使う際のベストプラクティス案みたいなものを考えていこうと思います。 なお、本稿で扱うAngular2のバージョンはbeta.0です 基本的な使い方 まずはざっとAPIリファレンスを眺めます。 https://angular.io/docs/ts/latest/api/ 重要なのは以下のシンボルです。 HTTP_PROVIDERS Http Request Response HTTP_PROVIDERSはHttpクラスのインスタンスをDIで取得するために必要なプロバイダのセットです。テストでモックサーバーなどを差し込みたい場合はこのプロバイダをいじくります。 HttpはAjaxの主役、いわゆるクライアントです。このクラスのメソッドでリクエストを送り、レスポンスを受け取ります。 RequestはHttpクラスが
Have you ever been caught by complications surrounding Cold and Hot Observables with RxJS (Reactive Extensions for JavaScript)? Worry no more, there is only one "catch" to understand, and then the whole issue will make sense to you when developing reactive applications. [00:01] One of the first important problems people encounter with RXJS is that of cold and hot observables. We are going to see w
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く