3 ms·
> On top of Mithril, I recommend working in a functional reactive library (Kefir, Bacon, Rx, whatever else) to make the whole application declarative and functi
by Touche 11y ago
> On top of Mithril, I recommend working in a functional reactive library (Kefir, Bacon, Rx, whatever else) to make the whole application declarative and functional.
How are you using an FRP library with Mithril? I thought with vdom libraries you never touch the real DOM.
- davexunit 11y agoMithril allows you to declare callbacks for the various DOM events on the virtual DOM nodes. This is where you glue in the FRP library. A callback will set the current value for one of the roots of the signal graph.
- findjashua 11y agosynthetic events' handlers can publish events to a bus, and you can create observables on the events on the bus. VDom lets you express UI as a function of the state Observables let you express state as a function of user interactions