Re:Why I quit using SwiftUI
by foobarding on Sunday August 28, 2022 @05:46PM
(#32632396)
Dealing with SwiftUI recreating Views too often can be a challenge. I would have liked to have seen more details on how this guy setup his models.
In my experience, you definitely have to minimize work done in Views and maybe avoid `@Published` properties on your model in favor of more explicit calls to `objectWillChange.send()` to signal when you really are ready for the Views to be updated. SwiftUI does not seem to do a very good job of coalescing by default.
In my experience, you definitely have to minimize work done in Views and maybe avoid `@Published` properties on your model in favor of more explicit calls to `objectWillChange.send()` to signal when you really are ready for the Views to be updated. SwiftUI does not seem to do a very good job of coalescing by default.