

Optimistic UI and Reactive Programming with Elm - agrafix
http://athiemann.net/2015/07/26/optimistic-ui-elm.html

======
vvanders
The one thing I really like in react is the composability. I haven't seen a
mechanism a nice in elm like the virtual dom. It seems like things are much
more verbose with one-way signals.

That said I really like the rest of the language.

~~~
masklinn
> I haven't seen a mechanism a nice in elm like the virtual dom.

It's not quite clear what you mean, the "view" function of a standard Elm
application is a virtual dom, elm.html is implemented on top of the virtual-
dom library[0]. If you mean component, as far as I understand in Elm you'd use
separate models and sub-functions in separate modules for each concern
("component")[1]. Elm subscribes to the "single point of truth" philosophy[2]
so there isn't really a sense of component-local state or lifecycle.

[0] [https://github.com/Matt-Esch/virtual-dom](https://github.com/Matt-
Esch/virtual-dom)

[1]
[https://gist.github.com/evancz/2b2ba366cae1887fe621#nesting](https://gist.github.com/evancz/2b2ba366cae1887fe621#nesting)

[2] like Om except more so

~~~
mateuszf
Does it also have a diff mechanism and rerenders on "state" changes?

~~~
spuz
Yes see this post that explains how html works in Elm: [http://elm-
lang.org/blog/blazing-fast-html](http://elm-lang.org/blog/blazing-fast-html)

