{"id":27786229,"url":"https://github.com/fluidgroup/swiftui-object-edge","last_synced_at":"2025-07-14T23:09:36.180Z","repository":{"id":275441299,"uuid":"926091102","full_name":"FluidGroup/swiftui-object-edge","owner":"FluidGroup","description":"Yet another @SwiftUI.State but using autoclosure","archived":false,"fork":false,"pushed_at":"2025-02-02T16:36:25.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-10T21:07:21.252Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FluidGroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-02T14:35:35.000Z","updated_at":"2025-04-14T12:12:20.000Z","dependencies_parsed_at":"2025-04-30T16:00:42.988Z","dependency_job_id":"b478fba6-9ae7-4ec7-b56d-d3b481e1f34b","html_url":"https://github.com/FluidGroup/swiftui-object-edge","commit_stats":null,"previous_names":["fluidgroup/swiftui-object-edge"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FluidGroup/swiftui-object-edge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-object-edge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-object-edge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-object-edge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-object-edge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/swiftui-object-edge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-object-edge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265365769,"owners_count":23753394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-30T15:58:14.058Z","updated_at":"2025-07-14T23:09:36.154Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ObjectEdge\n\nIt holds an object alongslide the view lifecycle.\nOne of the use cases is to hold a model object in a view. \n\n```swift\n@available(iOS 17, *)\n@Observable\nprivate final class Model {\n  \n  var count: Int = 0\n  \n  func up() {\n    count += 1\n  }\n}\n\n@available(iOS 17, *)\nprivate struct Demo: View {\n  \n  @ObjectEdge var model: Model = .init()\n  \n  var body: some View {\n    \n    VStack {\n      Text(\"\\(model.count)\")\n      Button(\"Up\") {\n        model.up()\n      }\n    }\n  }\n}\n```\n\nA question about how to use model objects using `@Observable`.  \nhttps://forums.developer.apple.com/forums/thread/739163\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswiftui-object-edge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluidgroup%2Fswiftui-object-edge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswiftui-object-edge/lists"}