Post

Replies

Boosts

Views

Activity

Cannot conform to 'ObservableObject';Key path value type '_' cannot be converted to contextual type '_'
import SwiftUI struct ContentView: View { @StateObject private var vm = PetsListViewModel init(){ _vm = StateObject(wrappedValue: PetsListViewModel(service: Webservice())) } var body: some View { NavigationView { ScrollView { ForEach(vm.components, id:\.uniqueId ){ component in component.render() } .navigationTitle("Pets") }.task { await vm.load() } } } }
1
0
378
Jul ’23