Generic Instance Method

onReceive(_:perform:)

Adds an action to perform when this view detects data emitted by the given publisher.

Declaration

func onReceive<P>(_ publisher: P, perform action: @escaping (P.Output) -> Void) -> some View where P : Publisher, P.Failure == Never