Ancestors

Written by comex on 2024-12-02 at 14:27

Yesterday I spent my entire 8-hour plane trip learning SwiftUI.

Mixed feelings.

It really is fun! Some things are better than I imagined.

Some are worse.

Why does Swift have 3.5 different reactivity frameworks!? Combine, Observation, SwiftUI views, and SwiftUI's deprecated ObservableObject. Each has a different concept of "reacting to an object's value changing”.

And none support async. Combine’s docs actually suggest using AsyncStream instead sometimes, so that's a 5th “framework”.

=> More informations about this toot | More toots from comex@mas.to

Written by comex on 2024-12-02 at 15:12

Also. I thought the whole point of SwiftUI's function-builder language magic was that it could partially re-evaluate view bodies.

So if you have a view with several controls depending on different inputs, and only one input changes, it would only re-evaluate the parts that depend on that input.

Or if you have a ForEach, it would only re-evaluate the iterations that changed.

But no. Any view will be evaluated entirely or not at all. Subview bodies can then be skipped if they compare equal.

=> More informations about this toot | More toots from comex@mas.to

Toot

Written by comex on 2024-12-02 at 15:13

(At least, this is true as far as I can tell, without seeing the source code.)

=> More informations about this toot | More toots from comex@mas.to

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113583876395756074
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
468.111939 milliseconds
Gemini-to-HTML Time
0.496438 milliseconds

This content has been proxied by September (ba2dc).