Replies: 1 comment
-
| @pastorin |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
-
| @pastorin |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m using swift‑dependencies alongside TCA in a SwiftUI app with a single “root” store that configures all my dependencies. In one part of the UI I need:
I want to avoid passing the full store down through every initializer and guarantee that the
UserReducerstore inUserListViewis created exactly once (not on every SwiftUI redraw)MainVieworUserListViewUserView, even though its parent is plain SwiftUI@Dependency(\.…)from the same root DependencyValuesWhat I’ve tried testApp.zip
Question
Has anyone found a more idiomatic or streamlined way, perhaps leveraging more of swift‑dependencies or TCA patterns—to embed a child store inside a non‑TCA SwiftUI container, share the same DependencyValues, avoid prop‑drilling, and keep the intermediate view completely free of TCA?
Beta Was this translation helpful? Give feedback.
All reactions