Do you think it's a good idea to scope the view mo...
# compose
l
Do you think it's a good idea to scope the view model (non-android-specific view model) to a screen? Currently I'm scoping it to the app but I have following screen:
Copy code
@Composable
fun DsdScreen(
    device: BluetoothDevice,
    presenter: DsdPresenter,
    onUp: () -> Unit,
    content: @Composable (PaddingValues, Int) -> Unit
) {}
which forces me to rethink this decision. My idea is to instantiate the
DsdPresenter
when calling the screen and pass the device to the presenter... What advantages do I get by scoping view model to screen instead of using it as singleton? Edit: I'm not using jetpack compose-navigation.