Michael Long
Jul 1, 2023

--

Sigh. The items in the list are identifiable. As such when the state changes the visible items in the list are diffed to see if a change in order has occurred, but that is NOT a view update, since the view bodies are not reevaluated. (add a _printChanges to RowView's body to see this.)

List(items) and ForEach(items) both use the same exact mechanism. The behaviors are identical.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet