Is there any danger to keep ViewModels inside Classes vs inside Composables ? #533
radomartinec
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Our project is:
Current approach is:
and new approach - would help us with reusability, maintanance etc - would be:
This would allow having a lot of common logic in the GenericScreen, but the model instances would be no longer created by the composable content functions, but by the classes. Instances of the classes are probably kept longer, for navigation reasons, and so the models and all the resources they initialize and use could probably cause leaks and eat resources (db connections etc).
Is this concern valid? How does the voyager handle class instances internally?
Thanks for any insight or comments to this .
Beta Was this translation helpful? Give feedback.
All reactions