Having an application with a main App.kt that hand...
# compose
p
Having an application with a main App.kt that handles navigation, and a lower bar, that let's you navigate and launch other actions that are shared between all the application, how to deal with mvvm pattern? I mean, the app.kt and the lower bar, are onscreen always, when you navigate to screen A, screen B or screen C, the parent App.kt scaffold with his lower bar with the navigation buttons are still visible. So, in this case, should the app have a AppViewModel loaded and managing some shared logic between (navigation, dialogs, shared logic that can be launched in all the screens... ) and also a ScreenAViewModel, ScreenBViewModel etc... that can coexist at once with AppViewModel?
f
Hey Pablo, I think that would be the way to go for your use case. There's no problem with having more than one viewModel, you can have an AppViewModel for global state and a scren-specific for your tabs