Instance Propertyswift-composable-architecture 1.18.0ComposableArchitecture
toCaseState
SwitchStore.swift:120- iOS
- deprecated
- macOS
- deprecated
- tvOS
- deprecated
- watchOS
- deprecated
@MainActor let toCaseState: (EnumState) -> CaseState?
@MainActor let toCaseState: (EnumState) -> CaseState?
s22ComposableArchitecture7CaseLetV02toC5Stateyq0_Sgxcvp
What are these?840UD
import ComposableArchitecture
The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. It can be used in SwiftUI, UIKit, and more, and on any Apple platform (iOS, macOS, tvOS, and watchOS).
@MainActor struct CaseLet<EnumState, EnumAction, CaseState, CaseAction, Content> where Content : View
A view that handles a specific case of enum state in a SwitchStore
.
@globalActor final actor MainActor
A singleton actor whose executor is equivalent to the main dispatch queue.
@MainActor init(_ toCaseState: @escaping (EnumState) -> CaseState?, action fromCaseAction: @escaping (CaseAction) -> EnumAction, @ViewBuilder then content: @escaping (_ store: Store<CaseState, CaseAction>) -> Content, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column)
Initializes a CaseLet
view that computes content depending on if a store of enum state matches a particular case.
@MainActor var body: some View { get }
@MainActor let content: (Store<CaseState, CaseAction>) -> Content
@MainActor let fromCaseAction: (CaseAction) -> EnumAction