ParameterizedConnectable

@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public protocol ParameterizedConnectable

Makes a view connectable to the application state using a parameter value.

  • Undocumented

    Declaration

    Swift

    associatedtype Superstate
  • Undocumented

    Declaration

    Swift

    associatedtype State
  • Undocumented

    Declaration

    Swift

    associatedtype Parameter
  • updateWhen(action:with:) Default implementation

    Causes the view to be updated based on a dispatched action.

    Default Implementation

    Default implementation disables updates by action.

    Declaration

    Swift

    func updateWhen(action: Action, with parameter: Parameter) -> Bool

    Return Value

    True if the view should update.

  • The method can return nil until the state becomes available. While it is nil, the view will not be rendered.

    Declaration

    Swift

    func map(state: Superstate, with parameter: Parameter) -> State?

    Return Value

    The state if possible.

  • connect(with:) Extension method

    Connect the view to the application state via a provided parameter

    Declaration

    Swift

    public func connect(with parameter: Parameter) -> some View

    Parameters

    parameter

    A view specific value required to connect the appropriate state.

    Return Value

    The connected view.