aris
struct ContentView: View { @StateViewModel var viewModel = HomeViewModel( repository: KoinDependencies().repository ) var body: some View { if let characters = viewModel.example, !characters.isEmpty { NavigationStack { ScrollView { LazyVStack(alignment: .leading, spacing: 20) { ForEach(characters, id: \.self) { item in NavigationLink(destination: {}) { ItemList(item: item, onClick: {}) } .buttonStyle(PlainButtonStyle()) } } .padding(.horizontal) } } } else { Text("No data available") }
A modern programming language that makes developers happier.