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).
@preconcurrency @MainActor init<IfContent>(_ store: Store<PresentationState<State>, PresentationAction<Action>>, @ViewBuilder then ifContent: @escaping (_ store: Store<State, Action>) -> IfContent) where Content == IfContent?, IfContent : View
Initializes an IfLetStore
view that computes content depending on if a store of PresentationState
and PresentationAction
is nil
or non-nil
.
@preconcurrency @MainActor init<IfContent>(_ store: Store<State?, Action>, @ViewBuilder then ifContent: @escaping (_ store: Store<State, Action>) -> IfContent) where Content == IfContent?, IfContent : View
Initializes an IfLetStore
view that computes content depending on if a store of optional state is nil
or non-nil
.
@preconcurrency @MainActor init<IfContent, ElseContent>(_ store: Store<State?, Action>, @ViewBuilder then ifContent: @escaping (_ store: Store<State, Action>) -> IfContent, @ViewBuilder else elseContent: () -> ElseContent) where Content == _ConditionalContent<IfContent, ElseContent>, IfContent : View, ElseContent : View
Initializes an IfLetStore
view that computes content depending on if a store of optional state is nil
or non-nil
.
@preconcurrency @MainActor init<DestinationState, DestinationAction, IfContent>(_ store: Store<PresentationState<DestinationState>, PresentationAction<DestinationAction>>, state toState: @escaping (_ destinationState: DestinationState) -> State?, action fromAction: @escaping (_ action: Action) -> DestinationAction, @ViewBuilder then ifContent: @escaping (_ store: Store<State, Action>) -> IfContent) where Content == IfContent?, IfContent : View
Initializes an IfLetStore
view that computes content depending on if a store of PresentationState
and PresentationAction
is nil
or non-nil
and state can further be extracted from the destination state, e.g. it matches a particular case of an enum.
@preconcurrency @MainActor init<DestinationState, DestinationAction, IfContent, ElseContent>(_ store: Store<PresentationState<DestinationState>, PresentationAction<DestinationAction>>, state toState: @escaping (_ destinationState: DestinationState) -> State?, action fromAction: @escaping (_ action: Action) -> DestinationAction, @ViewBuilder then ifContent: @escaping (_ store: Store<State, Action>) -> IfContent, @ViewBuilder else elseContent: @escaping () -> ElseContent) where Content == _ConditionalContent<IfContent, ElseContent>, IfContent : View, ElseContent : View
Initializes an IfLetStore
view that computes content depending on if a store of PresentationState
and PresentationAction
is nil
or non-nil
and state can further be extracted from the destination state, e.g. it matches a particular case of an enum.