News for hackers. Stuff that matters.
Re:iOS4 Built in SwiftUI by MrGando on Thursday June 10, 2021 @12:33AM (#27456687)
> You could reduce the number of State variables using one or more shared state objects and access via environment at certain points in the view hierarchy.

Just a personal opinion here, but those shared state objects and SwiftUI + glorified singletons really hurts every time I see it. It's so prevalent in online tutorials like Ray Wenderlich and the such.

Honestly, it's hard to avoid and can be done but requires a significant effort. I was hoping for Apple to come up with a more elegant solution during WWDC 21 but so far I haven't seen anything to improve this situation.

There are no comments on this comment yet.