collectAsNamedState

fun <T> StateFlow<T>.collectAsNamedState(name: String): State<T>(source)

Like collectAsState, but tells the porthole what the resulting State is called.

Worth using on anything Flow-shaped. A plain collectAsState produces an anonymous State object, so recompositions it causes are attributed to <unnamed:...>, which is exactly the dead end this tool exists to avoid.