Comments (2)
抱歉 @kkkelicheng ,让你久等了,由于我最近有点忙,还没来得及回复你。
你提的问题非常具有代表性,我需要整理一下思维。
在下周之前回答你提出的问题。
谢谢你的关注!
from rxswift-chinese-documentation.
怎么理解Observable的附加作用就是subscribe函数?
虽然文档解释了是类似于Observeable.create({})。
然后文章直接给出了,这里的闭包{ (observer) -> Disposable in ... }可以看作是 subscribe 函数。
。。。小弟不才,还请大佬指导一下。
public func subscribe<Observer>(_ observer: Observer) -> RxSwift.Disposable
subscribe函数哪里来的附加作用。
你好,public func subscribe<Observer>(_ observer: Observer) -> RxSwift.Disposable
是一个抽象的 interface.
而在具体的使用场景中, func subscribe
的内部实现是确定的,而这些内部实现往往会包含诸如:
- 网络请求
- 点击事件,用户输入
- 数据库操作
- ...
类似的的附加作用 。
如果你有任何疑问,还请给我留言。
谢谢!
from rxswift-chinese-documentation.
Related Issues (12)
- the documentation on gitbook.com is not latest HOT 2
- 错误反馈 HOT 1
- 错别字
- 好像没有介绍 throttle 这个操作符? HOT 1
- 如何选择操作符这一节,里的 shareReplay 已经过期了,是不是可以考虑更新下?
- 如何选择操作符中concatMap的说明好像有点偏差? HOT 2
- 能否提供 PDF 格式下载 HOT 3
- pdf 文档 HOT 4
- 操作符中缺少了 throttle HOT 1
- 对于已弃用的api Variable,文档中应该及时更新,不然容易误导 后来学习者 HOT 2
- epub的字体大小使用非标准版本? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxswift-chinese-documentation.