Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AS-IS
기존의 화면플로우 구조를
TO-BE
TCA를 사용한 구조로 변경합니다.
KEY-POINT
TCA를 이용하여 앱전체의 화면플로우 구성
AppFeature: 앱전체의 상태를 관리하는 최상위 리듀서입니다
MainTabFeature: 탭바리듀서를 embed 한다.
AppFeature에서 자식리듀서의 상태를 관리하고 scope을 정의하여 하위리듀서를 넘겨줍니다 이렇게하면 자식리듀서에서 발생한 액션을 부모리듀서에서 감지하여 추가적인 로직을 실행할 수 있습니다.
AppFeature에서 settingReducer의 logoutButtonTap 액션을 전달받아 상태를 변경합니다.
자식리듀러서넘겨줄때 넘겨줄 scope을 정의해야합니다.
SCREENSHOT (Optional)
TCA 공식문서 Scope
https://pointfreeco.github.io/swift-composable-architecture/0.54.0/documentation/composablearchitecture/scope/