Noticing some weird issues as I’m trying to upgrad...
# compose
v
Noticing some weird issues as I’m trying to upgrade my library to beta-01. Think that some mutable state values are only being propagated once I minimize the app and open it again. Anyone notice something of this flavor or an existing bug that might’ve been discussed already?
🤔 1
a
if you listen for changes with a
snapshotFlow {}
does it emit values for changes or no?
v
I was trying to remember what lets me debug and monitor these changes. Giving this a shot!
a
you can also use the direct
Snapshot.register
method to register an apply observer which will be a bit more direct/immediate, but the flow should be enough to tell if snspahots are being applied at all or not
v
I used
Snapshot.sendApplyNotifications()
after updating the state properties to make sure that the changes are propagated. Strangely enough, I don’t see my print statements or debug points being triggered for the
snapshotFlow
. This is how I was using it.
Copy code
snapshotFlow { showkaseBrowserScreenMetadata.value.currentGroup }
   .map {          
       Log.e("Debug", it.toString())
    }
Here
showkaseBrowserScreenMetadata
is a
MutableState
object and the value it holds is a data class with a few properties. It’s initialized using this line
Copy code
val showkaseBrowserScreenMetadata = 
    remember { mutableStateOf(ShowkaseBrowserScreenMetadata()) }
a
odd. File a repro if you can isolate one
v
sounds good! Thanks for your help 🙏🏼