The Composable Architecture
The Composable Architecture is a brand new architecture developed by Stephen Celis and Brandon Williams over pointfree.co. It has similarities with Redux where take [[ Unidirectional Data Flow ]] concept and best combined with SwiftUI.
The declarative way of SwiftUI let’s The Composable Architecture dictate the rendering of the UI using special object called ViewStore
Github: https://github.com/pointfreeco/swift-composable-architecture DocC: https://pointfreeco.github.io/swift-composable-architecture/0.42.0/documentation/composablearchitecture/
Tokopedia has it’s own TCA fork which use RxSwift as reactive backbone: https://github.com/tokopedia/RxComposableArchitecture
Linked Notes:
Pattern matching in Enum
While working using [[The Composable Architecture]] I often need to match a specific enum action or dealing with extracting associated value in enum. There’s a few different way to pattern matching an enum and extract its associated value: