These are chat archives for ThoughtWorksInc/Binding.scala

21st
Apr 2018
Mustafa Kuscu
@mcku
Apr 21 2018 04:13
I think redux is useful because it helps to write correct programs using javascipt, an overly async language. But i don't see such js weirdness using scala.js.
Would it be safe to keep a large and dynamic app state using Var()s? Would it scale well and bindings to those vars still perform well?
ritschwumm
@ritschwumm
Apr 21 2018 11:01
@mcku i wouldn't use it - way too complicated for something you can do better in 30 lines of JS yourself.
Mustafa Kuscu
@mcku
Apr 21 2018 12:35
Yes, i agree it is way too complicated. Switching to scalajs + binding.scala. Had to use typescript for client code, but can't make it fully typed without cumbersome efforts. So still runtime debugging it. Hope the new environment will help. I didn't want to go through the scalajs-react option, as react won't be necessary at all. :)
And i didn't like the paradigm to test if a button will render or not :)
Mustafa Kuscu
@mcku
Apr 21 2018 12:41
Robustness is a valuable thing. I expect to become happier in the end of the day.
杨博 (Yang Bo)
@Atry
Apr 21 2018 19:09
All properties defined in scala-js-dom is automatically available for XHTML literal in Binding.scala.
Other attributes can be handled in the data:prefix
@mcku If it's a missing feature in Binding.scala, feel free to create issue. If it's about the general usage of Binding.scala, feel free to ask on StackOverflow.
Mustafa Kuscu
@mcku
Apr 21 2018 19:15
@mcku actually, i am not sure. i was looking at the dom.scala code at https://github.com/ThoughtWorksInc/Binding.scala/blob/11.0.x/dom/src/main/scala/com/thoughtworks/binding/dom.scala#L143. There TagsAndTags2 has the generic attributes and jsDom.Cap covers it right? but i get value aria-checked is not a member of org.scalajs.dom.html.Div error on
<div role="option" aria-checked="false"/>
tell me, issue or SO?
杨博 (Yang Bo)
@Atry
Apr 21 2018 19:17
Why not both?
Mustafa Kuscu
@mcku
Apr 21 2018 19:17
all right
anyway, xhtml defines the scope already :)
Mustafa Kuscu
@mcku
Apr 21 2018 19:22
which excludes html5 specific stuff :/
杨博 (Yang Bo)
@Atry
Apr 21 2018 19:23
Not really, there is XHTML5
Mustafa Kuscu
@mcku
Apr 21 2018 19:25
is there? i thought it never existed
杨博 (Yang Bo)
@Atry
Apr 21 2018 19:26
Try googling it
Mustafa Kuscu
@mcku
Apr 21 2018 19:27
OK, there is XHTML5: "HTML5 and XHTML5 have identical vocabulary but different parsing rules"
Mustafa Kuscu
@mcku
Apr 21 2018 20:02
ok. looks good now
杨博 (Yang Bo)
@Atry
Apr 21 2018 20:03
StackOverflow + Google is brilliant. It is available to search immediately https://www.google.com/search?q=aria+binding.scala
Mustafa Kuscu
@mcku
Apr 21 2018 20:04
i agree. very quick
杨博 (Yang Bo)
@Atry
Apr 21 2018 20:04
Other users will benifit from that