asStateOwner

Create a StateOwner from the given StateHolder.

This is primarily used when delegating to the StateHolder.state property.

Example:

class MyModel(
private val container: StateContainer<Boolean>
) : StateOwner<Boolean> by container.asStateOwner() {
// ...
}