David Beck :xcode: on Nostr: So earlier this year we got this very useful piece of documentation from Apple on how ...
Published at
2023-09-11 03:17:57Event JSON
{
"id": "bc3168181eef890fd6a0f52a95b742387061d4ae84bb20c3ef611816f4de3e4a",
"pubkey": "347e56e8185507e0543f70ae84bb97cf5f4f23ad4782daacd437ac53a1519634",
"created_at": 1694402277,
"kind": 1,
"tags": [
[
"proxy",
"https://tnku.co/users/david/statuses/111044347654648555",
"activitypub"
]
],
"content": "So earlier this year we got this very useful piece of documentation from Apple on how to initialize StateObject properly that takes advantage of autoclosure to avoid re-initializing observable objects each time the view is rendered. https://developer.apple.com/documentation/swiftui/stateobject#Initialize-state-objects-using-external-data\n\nBut with Observable, you use State instead of StateObject, which doesn't have an autoclosure initializer. So… what are you suppose to do?",
"sig": "5ca2340495b328b4c6a0d78deb8420774d7db8ac31b882bdc1caed9dd3011dea09faac634b6b4d11c5a5759ad642691ee90cad2932dbe0f3b76ffdfd1262e677"
}