RJS的基本概念
什么是RxJS?
Reactive Extension JavaScript. It's a reactive streams library that allows you to work with asynchronous data streams.
We represent asynchronous data streams using observable sequences.
什么是asynchronous data streams?
1. asynchronous: When we called a function and want to be notified when the result is available, we will have to register a callback. In this way, we can continue with execution without worrying about the webpage becoming unresponsive.
2. data: Raw information in JavaScript.
3. streams: Sequences of data, in other words, information made available over time. Different from arrays, it doesn't have to be present in order.
何谓observable sequences?
就是observables。Observables are flexible and have to patterns: push and pull.
push pattern: We use the push pattern to subscribe to the source stream and react to new data.
pull pattern: We use the pull pattern in the same way above but, synchronously.
关键字:angular2, rxjs, streams, data
版权声明
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处。如若内容有涉嫌抄袭侵权/违法违规/事实不符,请点击 举报 进行投诉反馈!