0

LazyVstack insde TabView wrapped on scrollView not working (performance issue)

var body: some View {
      ScrollView {
        Text("hello, world!")
        TabView(selection: $tab) {
          p1().tag(0)
          P2().tag(1) 
        }
      }
}
Struct P1: View {
   var body: some View {
      LazyVstack {
        Foreach(0...150, id: \.self) { i in
       Text("Row -> \(i)")
      }
   }
}

So all rows in LazyVsatck was rendering From 0 to 149 once , lazy behavior not working here with TabView how i can achieve and solve this issue

0 Answers0