How do I merge a Signal and a SignalProducer into a Signal in ReactiveSwift?
Below is what I have so far. I can't figure out how to get a Signal
on line 3.
let (signalA, observerA) = Signal<String, NoError>.pipe()
let signalProducer = /* some signalproducer */
let signalFromSignalProducer == /* how to get a signal from signalProducer here??? */
let mergedSignal = Signal.merge([signalA, signalFromSignalProducer])
I've looked at this startWithSignal
method
public func startWithSignal(_ setup: (ReactiveSwift.Signal<Value, Error>, Disposable) -> Swift.Void)
but it takes a closure. Why can't it just return a signal? I don't want to have to create another nested closure for every signalProducer i need the signal from. What.
I'm new to ReactiveSwift and honestly this is the most confusing framework I've ever came across