Alex Brown on Nostr: npub1sy8vt…pw2zc I love this article, this is an area I'm learning about right now. ...
npub1sy8vt0hed8vr58ueqjlvmpzylv9he2fvv04luf4z5vyzsuut5zvqfpw2zc (npub1sy8…w2zc) I love this article, this is an area I'm learning about right now.
My view is you should never write to bindings outside of a SwiftUI view call back.
Even synchronizing updates onto the main thread, traditionally, didn't save you from writing at the wrong moment in the view life cycle. It's possible that has changed more recently.
I suggest using an observable object to synchronize the changes; these are safe to write to at any time using the main thread.
My view is you should never write to bindings outside of a SwiftUI view call back.
Even synchronizing updates onto the main thread, traditionally, didn't save you from writing at the wrong moment in the view life cycle. It's possible that has changed more recently.
I suggest using an observable object to synchronize the changes; these are safe to write to at any time using the main thread.