Post

Replies

Boosts

Views

Activity

Reply to No exact matches in reference to static method 'buildExpression'
Of course! The error occurs on the line that says .environmentObject(registrationViewModel) import SwiftUI struct ContentView: View { @StateObject var viewModel = ContentViewModel() @StateObject var registrationViewModel = RegistrationViewModel() var body: some View { Group { if viewModel.userSession == nil { LoginView() .environmentObject(registrationViewModel) } else if let currentUser = viewModel.currentUser { MainTabView(user: currentUser) } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
Jul ’23