Comments (2)
You're using PublishSubject<Any> = PublishSubject.create()
inside BaseOrbitContainer
. Subject
s are great, however, they are stateful in a damaging way: when they receive an onComplete or onError they no longer become usable for moving data. So you might wanna check Relays which are basically Subject
s except without the ability to call onComplete or onError.
from orbit-mvi.
Thanks for the suggestion @mradzinski. I'll explain how I understand this - please correct me if I'm wrong and let me know your thoughts!
Relays for Orbit would help in cases where upstream observables that feed into the input
emit errors. However with some recent changes in 1.2.0
we no longer expose the input subject outside of an OrbitContainer
or OrbitViewModel
so this removes the need for the relays (we actually had them in at some point but decided to remove the extra dependency).
Not sure if we should be concerned with using relays in case of downstream observables getting errors since this is usually a user error (typically not handling and wrapping exceptions) and pretty fatal so these are the cases that we need to handle somehow. In such a case, you wouldn't be able to reuse such an OrbitContainer
- relay or not.
It is usually quite difficult to find the error after this happens, so at the very least we should provide a nicer stack trace. As far as handling this gracefully it remains to be seen how far we can get with this :)
from orbit-mvi.
Related Issues (20)
- Improve test coverage
- Allow to repost the same SideEffect HOT 5
- Refactor sample apps to use simplified syntax HOT 2
- Provide better documentation around error handling of exceptions in coroutines
- Add better sample app testing example
- Add javadoc for lifecycle actions
- Improve documentation HOT 1
- Put Orbit on Maven Central
- Set up code coverage reporting
- Add kotlin fixture for tests
- Update to Gradle 6.0 HOT 2
- Add useful lint rules
- Prepare distribution for Orbit 2
- Update dependencies to the latest versions
- Orbit 2 Core
- Orbit 2 testing
- Orbit 2 coroutines
- Orbit 2 RxJava 2
- Orbit 2 LiveData
- Orbit 2 SavedState
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbit-mvi.