-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We need 'Action' similar to RAC's 'Action' or how to solve this with RxSwift? #254
Comments
@Fab1n Take a look at RxExample app. We use ActivityIndicator class in Wikipedia image search and Github repository search example. ActivityIndicator is pretty generic. The trick is to use That's how I would do it, not sure if there is some nicer way :) Note: We could have exposed |
Ok thank you 😀 I will have a look at it tomorrow
|
Looking forward to this! |
I've begun working on something like this here: https://github.com/ashfurrow/Action Still very early, and it's very scaled down from ReactiveCocoa's version, but I think it's a good start. |
Hey @ashfurrow , It will aggregate activity from multiple observables. Let me know what you think ... |
Neat! I'll have to take a closer look once I've had my coffee ☕️ |
It looks to me that |
Opened an issue to do it, I can't spare too much time on it right now but I'll see what I can do. Thanks so much for the suggestion! |
Action is awesome, thanks! |
|
We have some related projects grouped under RxSwiftCommunity organization. I'm thinking maybe it would be good idea to add I'll probably create a new project under RxSwiftCommunity for reactive data sources for table and collection views. What is currently in If people like @ashfurrow |
Yup! I've been discussing moving it over, but it needs to be "production ready" first. I have one remaining issue to get it there, but it needs |
@kzaher hahaha. It was my baby now is part of the community. I think ActivityIndicator would work great on RxViewModel |
We can probably close this issue for now. |
Imagine, we have a function like
func openAlert() -> Observable<AlertResponse>
whereAlertResponse
contains.OK
and.Cancel
for an alertView which has an OK and Cancel button.Now I want to know if the observable is currently active and bind this information to a - let's say - button's
rx_enabled
state to make clear that while the action is ongoing, the button can't be pressed.Doesn't make so much sense for Alerts, but here is another example:
On button tap, a server request is sent. How can I easily bind the button's
rx_enabled
subject to the actions ongoing state?It is quite common that I want to know if some action is currently active or not.
How to solve this in a nice way with RxSwift?
The text was updated successfully, but these errors were encountered: