Check out example codes for "rxswift combine two observables". It will help you in understanding the concepts better.

Code Example 1

Observable.combineLatest(
            sourceObservableA, sourceObservableB,
            resultSelector: { value1, value2 in
                print("\(value1) \(value2)")
        }).observeOn(MainScheduler.instance)
            .subscribe()
            .disposed(by: disposeBag)

Learn ReactJs, React Native from akashmittal.com