<https://github.com/freeletics/FlowRedux> the MVI ...
# orbit-mvi
m
https://github.com/freeletics/FlowRedux the MVI authors @Hannes along with @Gabriel Ittner wrote a State Machine MVI library, any though on this? *I just got this from Android Weekly newsletter
🙌 1
m
Looks interesting. MVI souped up with state machine semantics seems like a good step forward.
g
I don’t think this is an MVI library but a StateMachine one. It’s very similar to Tinder’s with the advantage of being written to multiplatform and with coroutines from the ground up.
I was reading their code and docs and found out that they use a StateMachine interface from: https://github.com/freeletics/mad#statemachine and implement it with the
Copy code
FlowReduxStateMachine
Which produces new states like MVI does, so in a way yes, it’s like a “mix” of a StateMachine with MVI behaviours 😊
nice find @miqbaldc it flew under my Android Weekly newsletter radar 😅
e
@Guilherme Delgado I've used Tinder's state machine implementation on multiplatform, it's not too hard to adapt
when using state machines I suggest to combine it with the state design pattern to encapsulate the state behavior (I've written an article about this here: https://medium.com/nerd-for-tech/the-super-state-design-pattern-166127ce7c9a), that way you get reusable state objects
g
@Emanuel Moecklin yup I’m using Tinder state machine too 🙂 You can find a working sample here: https://github.com/GuilhE/Expressus
e
g
yes you’re are correct, actually this is an open PR: https://github.com/Tinder/StateMachine/pull/28
gonna give credits to the author, thanks for remembering me 🙏
I gave credits in my article but forgot to add a comment in the code. Fixed 😉