Skip to content
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

Example for Combine #8

Open
Rion-Kaneshiro opened this issue Mar 2, 2020 · 4 comments
Open

Example for Combine #8

Rion-Kaneshiro opened this issue Mar 2, 2020 · 4 comments

Comments

@Rion-Kaneshiro
Copy link

Is it planned to make the example using Combine instead of RxSwift?

Man it sounds like I‘m an opponent of RxSwift xD

@pauljohanneskraft
Copy link
Collaborator

It would definitely be great to provide an example app with Combine instead of RxSwift.

However, due to time constraints, I cannot really work on it at the moment - feel free to open a MR yourself though! 😊

@Rion-Kaneshiro
Copy link
Author

Do you have any preference how this should be structured?

Adding canImport everywhere could be confusing.

Maybe splitting the project into two targets and having a shared code base.

As far as I see it right now the Model and the Impl files are effected by this since AnyObserver<Void> needs to be replaced by PassthroughSubject<Void, Never> to get the send(_:) functionality.
Of cause some ViewControllers also need some different behavior since there are no bindings in Combine (could be solved by using CombineCocoa).

@pauljohanneskraft
Copy link
Collaborator

pauljohanneskraft commented Mar 2, 2020

I'm not quite sure, whether mixing the two makes much sense, since it might overcomplicate things... A shared code base with different targets is also somewhat difficult since it would require too many changes or unfamiliar code (i.e. typealias instead of actual name or separate files altogether without much actually shared code). I would suggest doing the Combine version on a special branch and then cross-referencing the Combine and master branch.

@Rion-Kaneshiro
Copy link
Author

Rion-Kaneshiro commented Mar 2, 2020

Finished the rewrite.
Can you create a branch for it and merge the MR #9?
Linking this issue would be great, too :)

It's more or less a direct translation from one Framework to the other and certainly could be more "Combinely" (if thats a word).
I'll see how I can improve it in the coming days :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants