Skip to content
Discussion options

You must be logged in to vote

Shoutout to https://github.com/treboc who helped me figuring this out.
Seems as though what my mistake was is that I was instantiating the store in the init of the AppView which meant that it got re-rendered on every change.

Instead I am now rather instantiating the store in the Scene entry point of the app:

+import ComposableArchitecture
 import SwiftUI

 @main
 struct so_tca_docBasedWithTabsApp: App {
-    var body: some Scene {
-        DocumentGroup(newDocument: so_tca_docBasedWithTabsDocument()) { file in
-            AppView(document: file.$document)
-        }
+  var body: some Scene {
+    DocumentGroup(newDocument: so_tca_docBasedWithTabsDocument()) { file in
+      AppView(document

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by appfrosch
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant