/rx

Library for composing asynchronous and event-based operations in JavaScript

Primary LanguageScalaApache License 2.0Apache-2.0

Rx.js API for Scala.js

rx - Library for composing asynchronous and event-based operations in JavaScript

Description

Applications, especially on the web have changed over the years from being a simple static page, to DHTML with animations, to the Ajax revolution. Each time, we're adding more complexity, more data, and asynchronous behavior to our applications. How do we manage it all? How do we scale it? By moving towards "Reactive Architectures" which are event-driven, resilient and responsive. With the Reactive Extensions, you have all the tools you need to help build these systems.

Build Requirements

Build/publish the SDK locally

 $ sbt clean publish-local

Examples

import io.scalajs.npm.rx._ 

Rx.Observable.range(0, 5).filterWith(_ % 2 == 0).drainFuture map { values =>
    println(s"output: $values") //=> 0, 2, 4
}

Artifacts and Resolvers

To add the Rx binding to your project, add the following to your build.sbt:

libraryDependencies += "io.scalajs.npm" %%% "rx" % "0.5.0"

Optionally, you may add the Sonatype Repository resolver:

resolvers += Resolver.sonatypeRepo("releases")