scalatags-rx


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.timushev
ArtifactId

ArtifactId

scalatags-rx_sjs0.6_2.12
Last Version

Last Version

0.4.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_sjs0.6_2.12

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.6
org.scala-js : scalajs-library_2.12 jar 0.6.26
com.lihaoyi : scalarx_sjs0.6_2.12 jar 0.4.0
com.lihaoyi : scalatags_sjs0.6_2.12 jar 0.6.7

test (2)

Group / Artifact Type Version
org.scala-js : scalajs-test-interface_2.12 jar 0.6.26
com.lihaoyi : utest_sjs0.6_2.12 jar 0.6.6

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.4.0
0.3.0