I have a list view that contains my model with an ObservedObject property wrapper. That model contains an array of items.
From the list view I want to move to detail view showing the contents of one item in the array of my model. In the subview I want to modify that one item.
I tried to make similar structure in the subview with the only difference that there the array item itself would be as an ObservedObject property wrapper. However, I couldn’t do it that way and tried to google it.
I found this which seems to resolve the problem (I didn’t yet try it as I sort of lost trust in that as it seems highly complicated and not a pretty way of doing it).
So my question is, is it really that complicated? I know how struct works (ie. it is not a reference type, and hence modifying it is a bit different) but is there a more straightforward solution that I may just failed to find by googling?