3 ms·
How could I forget the bugs? We've failed at doing some simple things (like tooltips on styled buttons on macOS). An Apple engineer [0] said the nested generic
by tayistay 7y ago
How could I forget the bugs? We've failed at doing some simple things (like tooltips on styled buttons on macOS).
An Apple engineer [0] said the nested generics were used for SwiftUI because it makes diffing view hierarchies easy and makes identities stable, eliminating a class of bugs caused by changing view hierarchies during interactions or animations.
But does potential dynamism actually cause problems in practice? (I haven't used other reactive UI toolkits.)
It seems to me that most of the pain in using SwiftUI stems from the heavy reliance on generics. Hopefully it's worth it.
[0]: https://forums.swift.org/t/why-is-swiftuis-view-a-pat/28029/13 https://forums.swift.org/t/why-is-swiftuis-view-a-pat/28029/...