Sometimes I see state properties in classes, eg. i...
# compose
n
Sometimes I see state properties in classes, eg. in https://blog.canopas.com/android-drag-and-drop-ui-element-in-jetpack-compose-14922073b3f1
Copy code
...

internal class DragTargetInfo {
    var isDragging: Boolean by mutableStateOf(false)
    ...
    var draggableComposable by mutableStateOf<(@Composable () -> Unit)?>(null)
    ...
}

...

internal val LocalDragTargetInfo = compositionLocalOf { DragTargetInfo() }

...
Is this a good pattern for state management?
👌 7
c
This is basically all I do. flows scare me and ive gotten away building 2 full prod compose apps with mutableState*
😮 1
🙏 1