Hi! Back in October, I wrote a first article about using the compose-runtime instead of Viewmodels in Android development (or KMP) for state management. I got a few comments/feedback about state retention and testing. I answered those questions in this second article https://medium.com/entur/retaining-states-in-a-pure-composable-way-397706fbc811 and opened the way for a future third part.
p
Pearce Keesling
02/23/2025, 2:36 AM
It is possible to use circuit-retained without the rest of circuit if you want to use their implementation and that includes the cleanup logic. It's a bit tricky to figure out because you have to read through the source, but I think a recent release has made it a bit easier
j
jean
02/23/2025, 10:52 AM
I'll look into it, thanks! It would be really nice if they made it an independent library though
p
Pearce Keesling
02/24/2025, 4:12 PM
They do, circuit-retained is a standalone package you can include