Been working with fritz2 whole weekend, and I gott...
# fritz2
b
Been working with fritz2 whole weekend, and I gotta say, my main pressure point was state handling with stores. I'm sure it's just me not understanding the concept in full, so could you please extend that part of the docs going into a bit more advanced topics such as "thunks", asyncronous composite actions, merging store flows into composite flow, rendering an element that depends on multiple stores, etc...
j
We are planning to extend our docs with some receipts how-to achieve more complex things in fritz2. For now our examples and our docs are more basic and we know that. Perhaps you can give us some code examples that you found difficult? That would be helpful! Also feel free to give us a PR on our docs which we can review an merge 🙂 If you have specific problems or misunderstandings, let us know so we can help you. 😉
o
Wanted to ask something similar yesterday (Kotlin Rhein Main Meetup). Does one need a middleware like sagas, thunks for async effects? If I don't need them (bc of Flows and Coroutines): What if I trigger two async side-effects via a store - how can I influence the execution behavior / are there analogies to merge/exhaust/switch/concatMap etc. in Rx?
j
Thanks for your question, that is a good point when building complex real world applications. But personally I must say that I'm not quite familiar with frameworks like Rx. But I think most of your scenarios you described are already possible by using the excellent Kotlin coroutines framework (Flows, Channels, ... ) on which fritz2 relys. If you need help on a specific problem please let us know and we could try to help 🙂 So far we discovered no issues in build web-apps on top of this concept of coroutines, but of course there are some pitfalls and we have learned a lot (and still learning)! For me personally it was a mind-blowing experience to build things the functional/reactive way and to discover the new world behind my already known object-orientated Java world. 😅