Spent the last two days killing myself over a ForEach in SwiftUI because it wasn’t propagating changes from the array being reassigned.

Apparently to force a redraw when an array changes, have to change another simpler object that is attached to the ForEach().id() that changes each time a didSet is called on the array.

Seems like there should be an easier way to do this…

🤦🏼‍♂️

Reply to this note

Please Login to reply.

Discussion

Suppose it makes sense, because the array variable is just a pointer, and it doesn’t change, just the memory it’s point at changes.