I have an empty array var choosenData = [Choosen]()
By tapping a button, I append myView() component inside this array (component stored in another array)
self.choosenstore.choosenarray.append(
Choosen(value: self.collectionarray[index].value)
)
And I would like to display this array like this:
HStack {
ForEach(choosenstore.choosenarray) { choosen in
myView(myValue: choosen.value)
}
}
But on multiple lines. I tried multiple solution I saw on StackOverflow and other but it didn't work.
So maybe is it possible to like do a "ForEach(choosenstore.choosenarray between 0 and 4 )" then a "ForEach(choosenstore.choosenarray between 4 and 8 )" ect... ?
Thanks !