General questions should be asked on StackOverflow, not here. This room focuses on development of Binding.scala.
Atry on master
Update scalafmt-core to 2.3.2 Merge pull request #230 from sc… (compare)
I want to share some words from ESR's TAOUP
http://www.catb.org/esr/writings/taoup/html/ch01s06.html#id2878263
Rule of Representation: Fold knowledge into data, so program logic can be stupid and robust.
untyped
javascript paradigms. At some point you give up type safety, at least i have that feeling.
@pme123 If you like Redux's immutable store, and still want partial rendering. you can create some intermediate Binding
s, which can prevent unchanged value from re-rendering
An example is here:
https://scalafiddle.io/sf/o5fWdS3/2
render2
is not triggered because store2
is unchanged.
Open your browser's inspector to see if it is re-rendered.
@Atry Unfortunately I found a case where application which uses Binding.scala should depend on Scalaz. Please, see example from FAQ:
@dom def renderList(data: List[Binding[String]]) = <ol>{
import scalaz.std.list._ // Type classes for List
for (b <- data) yield {
<li>{b.bind}</li>
}
}</ol>
Can Dsl.scala remove this dependency (or change to Cats)?
for
-comprehension
@Atry If you're interested, I have repeated the js-framework-benchmark with different versions of Binding.scala.
Here are results for: Chrome 32-bit and for: Chrome 64-bit (sorry, 3 runs only).
Conclusions and questions:
let
and const
in ECMAScript 2015 code blocks has the same lifecycle as var
in IIFEs.