hi all, starting my first desktop compose app. i c...
# compose-desktop
a
hi all, starting my first desktop compose app. i come from the world of android so am used to MVVM and am thinking about using viewmodels as state holders here in a similar way. however, one of the main utilities of viewmodels on android is having a longer lifecycle than the view layer, which i dont think is an issue on desktop compose afaik. so am i going to be making things unnecessarily complicated for myself going forward in this fashion? does anyone have some recommendation of a ready made architecture pattern for me to organise my logic within this framework?
c
I've heard good things from #ballast
I've never really used anything like this and it's always felt fine. I just have immutable data classes for state, an interface that represents actions available for that state.
a
thank you, ballast sounds good! it also sounds as though i can free-wheel it a bit but my preference is often towards opinionated frameworks as i find i can accomplish a great deal of wheel spinning if left to my own devices
f
I'm using Voyager (ViewModel) Framework, I think it can also be implement with Decompose .
a
Check out Decompose - it brings a "tree structure" architecture pattern, plus navigation with state restoration (if needed). https://github.com/arkivanov/Decompose