This feels like a very awkward change. I'm not sure what the appropriate resolution for this is, but I guess we could assume it's isolated?
.onPreferenceChange(MyPreference.self) { value in
MainActor.assumeIsolated {
myValue = value
}
}
Of course this will crash at runtime if that assumption is incorrect.
This feels particularly bizarre now that all View conformances are automatically @MainActor now.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: