scalatags-rx


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.timushev
ArtifactId

ArtifactId

scalatags-rx_sjs1_2.13
Last Version

Last Version

0.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

scalatags-rx
scalatags-rx
Project URL

Project URL

https://github.com/rtimush/scalatags-rx
Project Organization

Project Organization

com.timushev
Source Code Management

Source Code Management

https://github.com/rtimush/scalatags-rx

Download scalatags-rx_sjs1_2.13

How to add to project

<!-- https://jarcasting.com/artifacts/com.timushev/scalatags-rx_sjs1_2.13/ -->
<dependency>
    <groupId>com.timushev</groupId>
    <artifactId>scalatags-rx_sjs1_2.13</artifactId>
    <version>0.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.timushev/scalatags-rx_sjs1_2.13/
implementation 'com.timushev:scalatags-rx_sjs1_2.13:0.5.0'
// https://jarcasting.com/artifacts/com.timushev/scalatags-rx_sjs1_2.13/
implementation ("com.timushev:scalatags-rx_sjs1_2.13:0.5.0")
'com.timushev:scalatags-rx_sjs1_2.13:jar:0.5.0'
<dependency org="com.timushev" name="scalatags-rx_sjs1_2.13" rev="0.5.0">
  <artifact name="scalatags-rx_sjs1_2.13" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.timushev', module='scalatags-rx_sjs1_2.13', version='0.5.0')
)
libraryDependencies += "com.timushev" % "scalatags-rx_sjs1_2.13" % "0.5.0"
[com.timushev/scalatags-rx_sjs1_2.13 "0.5.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.3
org.scala-js : scalajs-library_2.13 jar 1.1.1
com.lihaoyi : scalarx_sjs1_2.13 jar 0.4.3
com.lihaoyi : scalatags_sjs1_2.13 jar 0.9.1

test (2)

Group / Artifact Type Version
org.scala-js : scalajs-test-bridge_2.13 jar 1.1.1
com.lihaoyi : utest_sjs1_2.13 jar 0.7.4

Project Modules

There are no modules declared in this project.

scalatags-rx Build Status

ScalaTags-Rx is a small integration layer between ScalaTags and Scala.Rx. It provides a set of type class instances for Rx[T] values that allows you to use them directly in a ScalaTags DSL with changes automatically propagated to the resulting DOM:

import scalatags.rx.all._

object Example extends JSApp {

  val c = Var("blue")
  val text = Rx(s"It is a ${c()} text!")

  def toggle(): Unit = {
    c() = if (c.now == "blue") "green" else "blue"
  }

  override def main(): Unit = {
    document.body.appendChild(
      div(
        color := c, onclick := toggle _,
        text
      ).render
    )
  }

}

Getting Started

ScalaTags-Rx is hosted on Maven Central, to get started, simply add the following to your build.sbt:

libraryDependencies += "com.timushev" %%% "scalatags-rx" % "0.4.0"

For the latest development version use:

resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies += "com.timushev" %%% "scalatags-rx" % "0.4.1-SNAPSHOT"

Versions

Version
0.5.0