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

Question: use of Binder in RxTableViewDataSourceType conformance. #338

Open
apstygo opened this issue Sep 30, 2019 · 0 comments
Open

Question: use of Binder in RxTableViewDataSourceType conformance. #338

apstygo opened this issue Sep 30, 2019 · 0 comments

Comments

@apstygo
Copy link

apstygo commented Sep 30, 2019

Recently I started work on an Rx data source, using Apple's shiny new Diffable Data Source API. To learn more about how to create my own data source, conforming to RxTableViewDataSourceType, I read the implementation of RxTableViewSectionedReloadDataSource. But I can't wrap my head around the use of 'Binder' type.

Couldn't we just switched on observedEvent parameter and applied this new element whichever way we wanted? This binder object is not even retained, it's created every time a change occurs, which also seems counter-intuitive to me. But again, I'm probably missing the point.

It seems like 'Binder' is used here solely for the purpose of enforcing binding interface: crashing on errors and ignoring completes. Am I right?

I'm asking the question to decide whether or not to use this pattern in my own RxTableViewDataSourceType implementation. This could ultimately turn into a feature pull-request.

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

1 participant