All Projects → noheltcj → Rxcommon

noheltcj / Rxcommon

Licence: mit
Multiplatform implementation of ReactiveX providing a common way to build one set of business logic for native, iOS, Javascript, Android, JVM, and other platforms.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Rxcommon

Dynamicdata
Reactive collections based on Rx.Net
Stars: ✭ 1,083 (+1204.82%)
Mutual labels:  rx, reactivex
Flutter validation login form bloc pattern rxdart
[Functional reactive programming (FRP)]💧 💧 💧 [Pure RxDart] Validation login form by using the BLoC pattern with RxDart - A new Flutter project featuring a faked authentication interface to demonstrate validation. Implemented with BloC pattern.
Stars: ✭ 45 (-45.78%)
Mutual labels:  rx, reactivex
flutter-form-with-validation-BLOC
This form and validation functions are created by using the BLOC pattern with RxDart instead of using StatefulWidget
Stars: ✭ 63 (-24.1%)
Mutual labels:  reactivex, rx
rx
Reactive Extensions for D Programming Language
Stars: ✭ 52 (-37.35%)
Mutual labels:  reactivex, rx
Rx.Http
A reactive way to make HTTP Request in .NET Core 🚀
Stars: ✭ 62 (-25.3%)
Mutual labels:  reactivex, rx
WebsocketClientLite.PCL
websocket Client Lite PCL - Xaramrin
Stars: ✭ 22 (-73.49%)
Mutual labels:  reactivex, rx
Pharmacist
Builds observables from events.
Stars: ✭ 221 (+166.27%)
Mutual labels:  reactivex, rx
purescript-outwatch
A functional and reactive UI framework based on Rx and VirtualDom
Stars: ✭ 33 (-60.24%)
Mutual labels:  reactivex, rx
rx-reason
Reactive programming library for ReasonML/OCaml
Stars: ✭ 49 (-40.96%)
Mutual labels:  reactivex, rx
rxkotlin-jdbc
Fluent RxJava JDBC extension functions for Kotlin
Stars: ✭ 27 (-67.47%)
Mutual labels:  reactivex, rx
Rxrust
Rust implementation of Reactive Extensions.
Stars: ✭ 376 (+353.01%)
Mutual labels:  rx, reactivex
Rxswift Chinese Documentation
RxSwift 中文文档
Stars: ✭ 1,107 (+1233.73%)
Mutual labels:  reactivex
Vsphere Connect
A modern vSphere Client
Stars: ✭ 14 (-83.13%)
Mutual labels:  reactivex
Runtimepermission
Simpliest way to ask runtime permissions on Android, no need to extend class or override permissionResult method, choose your way : Kotlin / Coroutines / RxJava / Java7 / Java8
Stars: ✭ 860 (+936.14%)
Mutual labels:  rx
Angular Starter
📐 A boilerplate for HTML5, Angular, Material, TypeScript, and ReactiveX. Angular 11 | Webpack 4 | Firebase | Hosting | Functions | Workbox | PostCSS | TSLint | Jest | Puppeteer | Headless Chrome | Testing | Unit | E2E | REST | GraphQL | Apollo | Lazy Loading | AoT Compilation | Modular
Stars: ✭ 66 (-20.48%)
Mutual labels:  reactivex
Acgclub
一款纯粹的ACG聚合类App
Stars: ✭ 829 (+898.8%)
Mutual labels:  rx
Reaktive
Kotlin multi-platform implementation of Reactive Extensions
Stars: ✭ 760 (+815.66%)
Mutual labels:  rx
Reactiveui
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
Stars: ✭ 6,709 (+7983.13%)
Mutual labels:  reactivex
Rxpay
支付宝 微信 支付 Rxjava
Stars: ✭ 66 (-20.48%)
Mutual labels:  rx
Audio player flutter
🎧 Apple Music / Tidal Audio Player for Flutter
Stars: ✭ 52 (-37.35%)
Mutual labels:  rx

RxCommon

A multi-platform ReactiveX implementation targetting JVM, iOS, Android, and JS.

More targets can be added upon request.

Documentation

Please refer to https://reactivex.io for documentation.

Sources

The reactivex documentation covers much of the functionality. If there are any significant discrepancies, excluding those illuminated within this documentation, please post an issue.

  • Observable
  • Single - Similar to observable, but will complete when the first value is emitted.
  • BehaviorRelay - Subject which ignores all notifications. Relays retain and emit the latest element.
  • BehaviorSubject - Similar to the BehaviorRelay, but acknowledges notifications
  • PublishSubject
  • More coming, new collaborators / contributions are greatly appreciated.

Operators

More operators are coming quickly, but not all have been implemented.

Currently supported operators:

Examples

Single(just = "hello")
  .map { "$it world" }
  .subscribe(NextObserver { result ->
    // result => "hello world"
  })

/* Be sure to dispose when this is no longer needed to prevent leaks. */
val disposable = Observable<String>(createWithEmitter = { emitter ->
  emitter.next("we're happy")
  emitter.next("la la la")

  Disposables.create {
    /*
     * This block is called when this cold observable loses all of its observers or
     * a notification is received. Use this to clean up any open connections, etc.
     */
  }
}).flatMap { happyText ->
  /* Use the text to maybe fetch something from an api. */
  return@flatMap Single<String>(error = UnauthorizedException()) // Uh oh, expired access
    .onErrorReturn { throwable ->
      /* Handle throwable, maybe check for unauthorized and recover */
      return@onErrorReturn Single(just = "$happyText recovery")
    }
}.subscribe(NextTerminalObserver({ emission ->
  /*
   * emission => "we're happy recovery"
   * emission => "la la la recovery"
   */
}, { throwable ->
  /* No terminal notifications in this example */
}))

Installing

Please ensure you're using gradle 5.3+.

Installing has recently become significantly easier. Now it's as simple as including the following:

Kotlin Build Script

kotlin {
    sourceSets {
        val commonMain by getting {
            dependencies {
                api("com.noheltcj:rxcommon:0.6.1")
            }
        }
    }
}

Groovy Build Script

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                api 'com.noheltcj:rxcommon:0.6.1'
            }
        }
    }
}

Kotlin Support Map (For Native)

Since native modules require dependencies to be compiled with the same kotlin version, we will be keeping up with this support map going forward.

0.4.2 -> 1.3.20
0.5.0 -> 1.3.21
0.5.1 -> 1.3.21
0.5.2 -> 1.3.30
0.5.3 -> 1.3.31
0.6.0 -> 1.3.50
0.6.1 -> 1.3.61

Objective-C Generics

Objective-c only has partial generics support, so we lose a bit of information when this library is imported as a framework in XCode.

To help with this, when you produce an Objective-C framework, be sure to enable generics support.

components.main {
    outputKinds("framework")
    extraOpts "-Xobjc-generics"
}

Concurrency

This library doesn't support concurrency. In the majority of cases, concurrency is a side effect that can be handled on the platform. If you are doing anything that requires a significant amount of time to operate, it's important to do this work off the main thread (Especially if your application has a user interface). Of course do that using other resources such as RxSwift, RxJava, or basic platform concurrency frameworks, but ensure you've returned to the main thread before re-entering the common code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].