Ian Sikes
11/12/2020, 11:09 PMuseEffect
. For example:
val (session, setSession) = remember(sessionId) {
mutableStateOf(Session(sessionId))
}
When the sessionId
changes, a new Session
is created. But I need to call session.close()
beforehand. I can probably think of some hacky way to handle this but I'm trying to figure out what the "correct" Compose way isDominaezzz
11/12/2020, 11:10 PMDisposableEffect
might be what you're looking for.Ian Sikes
11/12/2020, 11:15 PM