What is Nostr?
Alex Brown /
npub1mec…z23s
2023-09-15 16:29:51
in reply to nevent1q…0qtn

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.
Author Public Key
npub1mecy69hsy407dah8j0eeej4hcf7pyw7lv66m6lkx8g2nrvpln34slcz23s