Swift44 [TCA] day 7 TCA의 Dependency에 대해서 (Effects-Basics) 코드 전문import ComposableArchitectureimport SwiftUIprivate let readMe = """ This screen demonstrates how to introduce side effects into a feature built with the \ Composable Architecture. A side effect is a unit of work that needs to be performed in the outside world. For example, an \ API request needs to reach an external service over HTTP, which brings with it lots of \ uncertainty and comp.. 2024. 4. 29. [TCA] day 6 TCA의 SharedState에 대해서 (GettingStarted-SharedState) 코드 전문import ComposableArchitectureimport SwiftUIprivate let readMe = """ This screen demonstrates how multiple independent screens can share state in the Composable \ Architecture. Each tab manages its own state, and could be in separate modules, but changes in \ one tab are immediately reflected in the other. This tab has its own state, consisting of a count value that can be incremented an.. 2024. 4. 27. [TCA] day 5 Optional State를 활용하여 View조작하기(GettingStarted-OptionalState) 코드 전문import ComposableArchitectureimport SwiftUIprivate let readMe = """ This screen demonstrates how to show and hide views based on the presence of some optional child \ state. The parent state holds a `Counter.State?` value. When it is `nil` we will default to a plain \ text view. But when it is non-`nil` we will show a view fragment for a counter that operates on \ the non-optional coun.. 2024. 4. 26. [TCA] day 4 BindableAction Portocol을 활용하여 Binding 하기(GettingStarted-Bindings-Forms) 코드 전문import ComposableArchitectureimport SwiftUIprivate let readMe = """ This file demonstrates how to handle two-way bindings in the Composable Architecture using \ bindable actions and binding reducers. Bindable actions allow you to safely eliminate the boilerplate caused by needing to have a \ unique action for every UI control. Instead, all UI bindings can be consolidated into a.. 2024. 4. 24. [TCA] day 3 기본적인 Binding을 활용한 View만들기 (GettingStarted-Bindings-Basics) 코드 전문 import ComposableArchitecture import SwiftUI private let readMe = """ This file demonstrates how to handle two-way bindings in the Composable Architecture. Two-way bindings in SwiftUI are powerful, but also go against the grain of the "unidirectional \ data flow" of the Composable Architecture. This is because anything can mutate the value \ whenever it wants. On the other hand, the Compos.. 2024. 4. 23. [TCA] day 2 기본적인 increase and decrease 가 있는 Counter 만들기(GettingStarted-Counter) 코드 전문 import ComposableArchitecture import SwiftUI private let readMe = """ This screen demonstrates the basics of the Composable Architecture in an archetypal counter \ application. The domain of the application is modeled using simple data types that correspond to the mutable \ state of the application and any actions that can affect that state or the outside world. """ @Reducer struct Counter.. 2024. 4. 20. 이전 1 2 3 4 5 6 7 8 다음