Check out example codes for "swiftui remove list dividers". It will help you in understanding the concepts better.

Code Example 1

init() {
	UITableView.appearance().separatorColor = .clear
}

var body: some View {
   List {
      ...
   }
}

Code Example 2

// while this solution works correctly let's clean up the work using ViewModifier

public struct ListSeparatorStyleNoneModifier: ViewModifier {
    public func body(content: Content) -> some View {
        content.onAppear {
            UITableView.appearance().separatorStyle = .none
        }.onDisappear {
            UITableView.appearance().separatorStyle = .singleLine
        }
    }
}

// now let's make a small extension that would help to hide the details
 
extension View {
    public func listSeparatorStyleNone() -> some View {
        modifier(ListSeparatorStyleNoneModifier())
    }
}

// As you can see, we’ve wrapped our appearance setting code into a neat little view modifier. you can declare it directly now

List {
    Text("1")
    Text("2")
    Text("3")
}.listSeparatorStyleNone()

Learn ReactJs, React Native from akashmittal.com