Thread
#reaktive
    Nikita Khlebushkin

    Nikita Khlebushkin

    1 year ago
    Hello! Is there a native way to convert Reaktive classes into RxSwift?
    Arkadii Ivanov

    Arkadii Ivanov

    1 year ago
    Hello! There is no "official" solution currently, but there is an open issue: https://github.com/badoo/Reaktive/issues/538 So for now it is advisable to implement interop on your own. It should be quite straightforward.
    Nikita Khlebushkin

    Nikita Khlebushkin

    1 year ago
    Thanks!
    Omar Mainegra

    Omar Mainegra

    1 year ago
    Maybe it's a good idea to provide a code snippet, even if it has to be copied manually on every project, I have one but I'm not even sure it's the correct approach
    Nikita Khlebushkin

    Nikita Khlebushkin

    1 year ago
    @Omar Mainegra could you share the snippet you have?
    Omar Mainegra

    Omar Mainegra

    1 year ago
    For sure
    extension Observable where Element: AnyObject {
        static func from(_ reaktiveObs: ReaktiveObservableWrapper<Element>) -> Observable<Element> {
            return Observable<Element>.create { observer in
                let disposable = reaktiveObs.subscribe(
                    isThreadLocal: false,
                    onError: { error in observer.onError(ReaktiveError(throwable: error)) },
                    onComplete: { observer.onCompleted() },
                    onNext: { value in observer.onNext(value) }
                )
    
                return Disposables.create { disposable.dispose() }
            }
        }
    }
    Nikita Khlebushkin

    Nikita Khlebushkin

    1 year ago
    Thanks!
    Omar Mainegra

    Omar Mainegra

    1 year ago
    NP, I'm not a 100% sure it's the best approach tho, but it's been working for us
    Arkadii Ivanov

    Arkadii Ivanov

    1 year ago
    Thanks for the sample. We are working on the interop, so please stay tuned. I will consider putting some samples meantime.
    Omar Mainegra

    Omar Mainegra

    1 year ago
    Awesome
    Arkadii Ivanov

    Arkadii Ivanov

    1 year ago
    Thanks @Omar Mainegra for the sample. I added a code snippet to the issue based on this.
    Omar Mainegra

    Omar Mainegra

    1 year ago
    Very nice, thank you