강의

멘토링

커뮤니티

Reviews 4

Average rating 5.0

Completed 100% of course

This was very helpful for project implementation :) Do you also take questions by any chance..??

dumveloper님의 프로필 이미지
dumveloper
Instructor

Yes, of course! Please ask your questions! It's an honor to be able to help with your project!

Thank you! Even though it was my first time encountering TCA, the course was so well-made that although it took some time, I was able to understand it smoothly(?) and even apply it to actual projects. As covered in the course, single-depth screen navigation like My Page → [Email / Profile / Nickname] editing screens is well understood, and I'm implementing it well! However, in actual apps, like Instagram, there are often deeply nested screen navigation structures like: Post → User A Profile → User A's Follow List → User B Profile → User B's Follow List... and I'm having difficulties with this part. I'd like to get advice on whether I missed something from the course, or if these multi-layered(?), nested(?) navigation patterns are inherently somewhat tricky in TCA! Just in case, let me explain the method I currently implemented: I thought I could create a navigation structure for My Page and reuse it, but when I try to do that, it crashes, so now... If I assume the cases where you can navigate from My Page are [Follow/Following List, Posts] screens: For example, If Tab 1 is post-related, you eventually need to go to My Page, right? If Tab 2 is reels/shorts-related tab, you also eventually need to go to My Page from here too. But right now, I'm copying and pasting the exact same My Page screen transition cases in each tab screen 😢

dumveloper님의 프로필 이미지
dumveloper
Instructor

I'm so sorry for the late reply; I missed the notification. I'm not sure what caused the crash, but you can build a navigation structure and reuse it. For example, you can create a child reducer responsible for navigation, define all the scopes to enter that reducer like this: Scope(state: \.profile, action: \.profile) { ProfileFeature() } And then manage it using StackState for each parent tab. state.path.append(.profile(ProfileFeature.State(userId: "me"))) It might be hard to read because the line breaks aren't working well here. ㅠㅠ @Reducer struct Path { @ObservableState enum State: Equatable { case profile(ProfileFeature.State) } enum Action { case profile(ProfileFeature.Action) } var body: some ReducerOf<Self> { Scope(state: \.profile, action: \.profile) { ProfileFeature() } } } @Reducer struct HomeTabFeature { @ObservableState struct State: Equatable { var path = StackState<Path.State>() } enum Action { case path(StackAction<Path.State, Path.Action>) case didTapMyProfile } var body: some ReducerOf<Self> { Reduce { state, action in switch action { case .didTapMyProfile: state.path.append(.profile(ProfileFeature.State(userId: "me"))) return .none ...

SwiftUI + TCA: Next-Generation iOS Architecture Completed Through Real-World Projects thumbnail
dumveloper

·

34 lectures

·

65 students

SwiftUI + TCA: Next-Generation iOS Architecture Completed Through Real-World Projects thumbnail
dumveloper

·

34 lectures

·

65 students