useFlowValueWithLifecycle
fun <T> ComponentScope.useFlowValueWithLifecycle(flow: StateFlow<T>, minActiveState: Lifecycle.State = Lifecycle.State.RESUMED): Value<T>
Returns a Value that reflects the current value of the given flow.
This StateFlow is collected on the CoroutineScope given by getTreeProp as long as the Lifecycle is at the minActiveState state, and collection pauses when the Lifecycle falls below minActiveState. The collection is canceled when this component is detached.
Unlike useFlowWithLifecycle, this hook returns a Value wrapper which enables deferred reads — the value is only read when accessed, allowing more granular tracking of state dependencies.