func transform(action: Observable<Action>) -> Observable<Action>
func transform(mutation: Observable<Mutation>) -> Observable<Mutation>
func transform(state: Observable<State>) -> Observable<State>
스트림을 변환하는 데 사용
아래와 같이 debug 오퍼레이터를 붙여서 디버깅용으로 사용할 수도 있다. 여기서도 스트림이 변환 되었다.
func transform(action: Observable<Action>) -> Observable<Action> {
return action.debug("action") // Use RxSwift's debug() operator
}
다른 옵저버블 스트림과 결합하는 곳에 사용
transform(mutation:) is the best place for combining a global event stream to a mutation stream.