Need help/suggestion on what is the ideal way to deal with TabRow, Lists and HorizontalPager.
Ahmed
10/16/2024, 10:32 AM
I have a
Copy code
listOf("Tab 1", "Tab 2", "Tab 3")
Which I am using for a
TabRow
with a
Copy code
HorizontalPager( .. ) { index ->
when (index) {
0 -> Tab1()
1 -> Tab2()
2 -> Tab3()
}
}
My question is regarding the list of tabs (name of tabs). Where would I keep the list? Would a new list be created on every recomposition? Do I need to remember the list?
Also, there's a special case where I need to omit