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
Bring back the Subject? #78
Comments
I'm not sure why this wasn't included in the Swift APIs. Where are you using it in your project? |
@mdiep At the moment I use it in places where I'd have used It's not appropriate to store a mutable property containing When this originally surfaced, @andersio and I were speaking about the common "table view cell configuration" pattern where we'd often just store properties containing the model values to be displayed, however we found that this might actually be a better solution—there's no additional storage required as the values are simply piped through to the destination UI components. I don't use it in this way (yet), but it's on my list to investigate in the future as it seemed like a good idea to avoid building too many layers of storage. Unit tests would be a lot nicer as well, because we use the The drawback of using an |
I don't think this is a good idea. I've seen this misused more often than not in RX frameworks. |
I'm pretty sure that was the reason for not making the pipe method return just one object, but two, because they almost always belong to different owners and they have different purposes. |
I definitely agree with this. But that wouldn't preclude us from having a |
Could you elaborate a little bit on this misuse, and how we get around it in the current design? This might help us to offer a path (and good explanation) to those that might wonder how to achieve what they did using |
@liscio We get around the misuse by decoupling the input and output into separate types. This allows us to model things in a cleaner way (a consumer that only needs to subscribe to the output can be passed solely the output, for example). |
@andersio @NachoSoto Considering how old this is, might be time to close it? |
Hello. 👋 Thanks for opening this issue. Due to inactivity, we will soft close the issue. If you feel that it should remain open, please let us know. 😄 |
A while ago, @andersio shared a gist with me that implemented a replacement for
RACSubject
. In essence, it just wraps the tuple returned bySignal<T,E>.pipe()
, but works much nicer in practice.Here's the gist containing his implementation: https://gist.github.com/andersio/3b4889176d6632bbb637ffd177795815/
Is there a reason that we don't offer this useful construct that we have available in ReactiveObjC? I've never loved the name, personally—calling it a
Pipe
would make far more sense—but since I integrated this code into a project I'm working on, life got a lot easier.Thoughts?
The text was updated successfully, but these errors were encountered: