Swift/TCA16 [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. [TCA] day 1 TCA에서 Alert와 Dialog를 다루기. GettingStarted-AlertsAndConfirmationDialogs 전체 코드 import ComposableArchitecture import SwiftUI private let readMe = """ This demonstrates how to best handle alerts and confirmation dialogs in the Composable \ Architecture. The library comes with two types, `AlertState` and `ConfirmationDialogState`, which are data \ descriptions of the state and actions of an alert or dialog. These types can be constructed in \ reducers to control whether.. 2024. 4. 19. 이전 1 2 3 다음