https://kotlinlang.org logo
#compose
Title
# compose
g

Guy Bieber

10/23/2020, 9:54 PM
Architecture question. I have a model, view, viewmodel setup. Since those terms can be misinterpreted I will give you my summary: model -> state that drives the view and outside interactions view -> composables driven by the model and with hooks for viewmodel actions viewmodel -> changes the model to change the view. handles view actions. handles outside actions. I have an application that has a pager that drives the rest of the logged in view, which in my case is a tabcontroller. Should I have pre-created views for all the page selections or just create views on the fly when a new page is selected. More concretely there is a horizontal pager that picks a vehicle to control. There are performance tradeoffs I am sure, but what would be best practice. Likely, the number of pages is relatively low (under 10). Thoughts?
I likely will not be updating the off screen “pages”.
3 Views