Scala.js and unidirectional data flow 2

Tags: , , , , ,

Scala.js and unidirectional data flow 2

Scala.js and unidirectional data flow 2

Last time we talked about using Monix as a tool of creating unidirectional data flow in Scala.js applications. The tiny Dispatcher class was made for that purpose. We considered the Counter example, which demonstrated all the power of this approach. Today I intend to widen our horizons and to consider another example: more complex one: which will demonstrate not only usage of the Dispatcher but also usage of Sortable.js with React. But before that I want to add some new methods to the Dispatcher class. Here is the full code of the Dispatcher class: import monix.execution.Ack import monix.execution.Ack.Continue import monix.reactive.{Observable,

Continue Reading

Designing facades in Scala.js

Designing facades in Scala.js

Scala.js builds a bridge from the Scala world to the JavaScript world. Today Scala developers can take all the magic of Scala with many powerful libraries and use it in front-end applications. But after passing the bridge our developer suddenly might find himself in very different environment. Does he know something about transition animation, or about event system on mobile devises? Fortunately JavaScript itself is ready to give a huge bulk of awesome libraries for all cases. All we need to do is to find an appropriate library and write a facade. You can find this in the Scala.js documentation: When

Continue Reading