Hello! I'm currently really struggling with how to...
# compose-desktop
a
Hello! I'm currently really struggling with how to properly manage state in Compose. For example, I currently have this code below:
Copy code
data class PointPath(
    val pathPoints: List<PathPoint>,
) {
    fun smoothPath(): PointPath { ... }
}
I made the data class immutable since recompositing isn't triggered when the list is updated and made it so anything that modifies it returns a copy (ex.
smoothPath
). However, this feels very cumbersome since I need to manually update the state with the returned copy. Is there a more effective way to do this, especially when it comes to handling the state when object properties change?
a
This feels like a question about Compose in general, rather than compose for desktop. You’ll probably get more replies in #compose
a
Alright, thanks. Another instance of me not being used to Slack and forgetting that I have to join channels to see them and know they exist
đź’ˇ 1