Feature to Feature binding
- Dominant language
- Kotlin
- Stars
- 1.3k
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
Hi.
In [best practices](https://badoo.github.io/MVICore/bestpractices/) you wrote next code
```
class BootstrapperImpl(
private val feature1: Feature1
) : Bootstrapper {
override fun invoke(): Observable =
feature1.news.map { SomeWishOfFeature2 }
}
```
But i can't understand best way to do this map , because news is ObservableSource and don't have map function.
Maybe you have some ktx extensions for this?
Now i do this.
```
class BootstrapperImpl(
private val feature: Feature1
) : Bootstrapper {
override fun invoke(): Observable =
Observable.create {
emitter ->
val newsListener = object : Observer{
override fun onNext(news: Feature1.News) {
when(news){
else->emitter.onNext(Wish.Update())
}
}
override fun onComplete() {
emitter.onComplete()
}
override fun onSubscribe(d: Disposable) {}
override fun onError(e: Throwable) {}
}
feature.news.subscribe(newsListener)
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the best-practices example and the BootstrapperImpl and Feature1.news entry points named in the report; reproduce why ObservableSource does not provide map. Compare that behavior with the current public API and determine whether the supported outcome is an API or extension change or a corrected example. Done means the feature-to-feature binding approach is clear and verified by the project’s relevant checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100