-
Notifications
You must be signed in to change notification settings - Fork 0
Update Readme.md with RxSwift Styles #3
base: master
Are you sure you want to change the base?
Conversation
Additional changes for RxSwift.
| This integer updates when foo happens to bar and is subscribed to. | ||
| Subscribe to this observable to get a predefined initial value and subsequent changes. | ||
| */ | ||
| myIntegerStream: Observable<Int> { get } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During our discussion we seemed to decide not to make distinction in the naming between cold and hot observables, but only document underlying behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this proposal is clearer. Also, I suspect the number of instances in which we make use of observables that require subscriptions to update is going to be small to non-existent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is going to be small to non-existent.
This is an overstatement. A lot of things can be modeled as a cold observable - e.g., network api request, user-initiated actions, etc.
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
Co-Authored-By: Vasyl Myronchuk <granfalloner@gmail.com>
| This integer is updated when foo happens to bar. | ||
| Subscribe to this observable to get its current value and subsequent changes. | ||
| */ | ||
| myIntegerStream: Observable<Int> { get } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| myIntegerStream: Observable<Int> { get } | |
| var myIntegerStream: Observable<Int> { get } |
| myIntegerStream: Observable<Int> { get } | ||
|
|
||
| // Defining a raw value is not preferred and should only be done in rare cases. | ||
| myInteger: Int { get } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| myInteger: Int { get } | |
| var myInteger: Int { get } |
Additional changes for RxSwift.