Chris Eidhof on Nostr: I wrote a new article about UIViewRepresentable. I came up with two rules for working ...
I wrote a new article about UIViewRepresentable. I came up with two rules for working with them: make all updates from UIKit -> SwiftUI async, and only update what's really needed when setting UIKit properties. If anyone has more feedback I'd love to hear it.
https://chris.eidhof.nl/post/view-representable/Published at
2023-09-13 06:44:28Event JSON
{
"id": "1446a034396ab3ac71ec3c6ffbaa1c4022a408f58fc287f62c1354e2f87d29ca",
"pubkey": "36fb9c68c8ef310b82bc748f1a33086f5a42fcb02e6a0e59867fd3efb3298121",
"created_at": 1694587468,
"kind": 1,
"tags": [
[
"proxy",
"https://m.objc.io/users/chris/statuses/111056484305283766",
"activitypub"
]
],
"content": "I wrote a new article about UIViewRepresentable. I came up with two rules for working with them: make all updates from UIKit -\u003e SwiftUI async, and only update what's really needed when setting UIKit properties. If anyone has more feedback I'd love to hear it. https://chris.eidhof.nl/post/view-representable/",
"sig": "f4e829eb48e6b069d4d8179336486f10b1bb712277503076fe12313353f478b8d3cc774cb51c6f1cdc5618a0ca354cb33a7a570f05bb7118df4343f06287f937"
}