Replies: 1 comment 2 replies
-
Injecting |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all ✌️
At our company we're currently migrating a codebase to TCA. Because of the codebase is written with different approaches sometimes it's very hard to migrate small part to TCA without big rewrites.
At this particular moment I'm struggling with this.
There's a feature which depends on a previously built
UIKit
based router. This router opens other legacyUIKit
basedUIViewController
's. Unfortunately, I cannot migrate navigation to the state base approach easily and use router as a dependency:This
LeafFeature
is a part ofAppFeature
:LeafView
is initialized in the oldUIKit
based controllerAt the moment of initialization, I'd like to inject in this router
navigationController.push
function in one way or another and use it then inside router. However, I have access to this function only at the moment of theLeafView
creation. The only one place for dependencies setup I've founded is insidebody
ofAppFeature
(at the moment of store creation). Thus, I don't have any instrument to override the dependency at the moment of view creation (at least I haven't founded one).I tried to provide the simplified examples of what do we have right now in the code base. Very appreciate all the answers and thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions