[Question] Exposing rx subjects from presenter to Interactor ?
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 193
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Original issue: https://github.com/uber/RIBs/issues/338
I was thinking whether there is any draw back in exposing rx subjects from the presenter to the Interactor. Taking an example of loading all employees in a tableview
Presenter:
protocol EmployeeListPresentable: Presentable { var empSubject: PublishSubject<[Employee]>{ get set} // Exposing rx subject }Interactor: //Assuming here employees is an array of
Employeeobjectsself.presenter.empSubject.onNext(employees)This is more convenient at times compared to calling a function. for eg:
protocol EmployeeListPresentable: Presentable { func updateEmployeeList(_ employees:[Employee]) }as the subj is already bound to UI and reloading takes place automatically.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked original issue and the Swift presenter/interactor examples in this report. Determine whether exposing a PublishSubject is intended to be supported and document the resulting guidance or decision; the issue is done when the design question has a clear, accepted answer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100