working on a compose multiplatform project, in one...
# multiplatform
y
working on a compose multiplatform project, in one of my screens there is too much of a UI state, and the ViewModel itself doesn't have any UI state but it is also kinda hectic, would it be a good idea to have 2 view models one for ui state and the other for business logic, what is the best approach here?
l
You might get more answer in #compose #compose-xyz 😉
c
If your ViewModel doesn’t hold any UI state but is getting bigger and bigger with business logic, that might be a signal that the ViewModel isn’t in the most appropriate place in your app for that code. It might be worth it to introduce an explicit Domain Layer to your application architecture and move that functionality into Use Cases, which then get called by the ViewModel or the UI