fdietze on master
Deploy website Deploy website … (compare)
fdietze on v1.0.0-RC8
fdietze on scoverage
Add Scoverage Plugin (compare)
fdietze on scoverage
Update plugins.sbt (compare)
Observable
means, we need to handle a subscriptions: adding callbacks onMount and onDismount. Operating on an Observer
, is great because you can just push things into an Observer
without state. So, it is kind of a performance optimization to prefer Observer operations.
Source
, Sink
generally, because I felt, it would be too intrusive, when just working with Monix or scalarx or airstream natively. Maybe, just hide them under a syntax._
-import? It is nicer too write. And that is an advantage of the Sink
, Source
archtiecture.
Observable
/Observer
there?
Source
and Sink
would feel wrong because usually algebraic methods are members these days. I hope that's going to change with scala 3 and the extension
keyword. No more .map
on everything. Just a single global extension method for all functor instances.
a.withLatest(b)
and the method on the static object Observable.withLatest(a, b)
. While I think its fine to have both, outwatch tends to use them at random in some places and I believe it would make the code more readable to make that a little more consistent.
not found: type Handler
[error] def cmpDate(hdl: Handler[Long]) =
import outwatch.reactive.handler.Handler
import outwatch.reactive.handlers.monix._
Handler
. To me, this concept feels too complex, that you indirectly create new instances of your stream-types (just with the help of a magic import). It just seems more straightforward to directly create your subjects with the library of your choice. The intent is much more clear.Observable
in your dom nodes.any idea why this code works perfectly, but if I put the class FrmClass
on another file it doesn't?
class TestingOnClassSpec extends JSDomAsyncSpec {
class FrmClass {
val testClick = new Observer[String] {
def onNext(elem: String): Future[Ack] = {
Future {
println(elem)
Continue
}
}
def onError(ex: Throwable): Unit = { println(ex.printStackTrace.toString) }
def onComplete(): Unit = println("O completed Handler")
}
val but = button( idAttr := "cmdTestOnClass", "Save", cls := "myButton",
onClick.use("on the observer a class ----------") --> testClick
)
}
it should "be test the save button" taggedAs(ButtonTestingTest) in {
val frm = new FrmClass
for {
_ <- OutWatch.renderInto[IO]("#app", frm.but)
} yield {
val element = document.getElementById("cmdTestOnClass")
sendEvent(element, "click")
succeed
}
}
}
something lacking me ?
VNode
. The element is what you can append the canvas to which is rendered by nspl.