floschu / reaktor Goto Github PK
View Code? Open in Web Editor NEW👾 A Framework for reactive and unidirectional Kotlin application archtitecture with RxJava2.
License: Apache License 2.0
👾 A Framework for reactive and unidirectional Kotlin application archtitecture with RxJava2.
License: Apache License 2.0
While writing a reactor that would cause a resource load to occur, I wanted to guard against loading the same resource… so naturally I would consult currentState
in my mutate
function… but then I started to think about threading. I had previously assumed that Reactor might provide some threading guarantees as other similar libraries do, but as far as I can tell DefaultReactor
will emit Action
s on whatever thread the ActionRelay
is used from. Because of this, I believe a stale read of currentState
could be possible. Do you agree?
Currently I am mitigating this (disclaimer: I haven't attempted to create a pathological scenario to test this out, so it's still conjecture) by using transformAction()
to observeOn(Schedulers.single())
. I'd love to hear your thoughts about this!
Also: thanks for writing such a clear & concise state management library for Android! It fits like a glove with our existing patterns, and we see ourselves standardizing on its usage across the app.
The flag crashInDebug
which can be set with the Reaktor.handleErrorsWith()
method is coupled to only escalate errors as app crashes if the library module is compiled in debug, as this flag is coupled with the libraries BuildConfig.DEBUG
flag:
I would propose to either consider using another way to check whether the app is in debug (as for example ApplicationInfo.FLAG_DEBUGGABLE
, which would add an android dependency into the core-reaktor), or decoupling the flag from a debug state and make it the developers choice / control, when the errors should be escalated as fatal crashes.
(Originally found here: diamirio/AndroidAppTemplate#11 (comment))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.