Toot

Written by Dale Price on 2024-12-13 at 22:27

[#]SwiftUI onPreferenceChange now requires a Sendable non-async closure in Xcode 16.2.

Does this mean we aren't supposed to be manipulating view state when a Preference value changes? Kicking off a Task satisfies the compiler, but seems like a bad idea.

How exactly are we supposed to be using onPreferenceChange now? Are there any other ways of passing values up the hierarchy that still work? Why aren't breaking changes like this explained in the release notes?

=> More informations about this toot | View the thread | More toots from dale_price@mastodon.online

Mentions

Tags

=> View swiftui tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113647869314998721
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
226.444759 milliseconds
Gemini-to-HTML Time
0.614298 milliseconds

This content has been proxied by September (3851b).