4 ms·
I would find it much simpler if the computational model of a DOM update is spelled out explicitly. Because, essentially, we are trying to update the DOM from a
by beders 6y ago
I would find it much simpler if the computational model of a DOM update is spelled out explicitly.
Because, essentially, we are trying to update the DOM from a single thread - buried in callbacks and need some nifty libraries around that.
Re-frame's domino model is super easy to understand. There's no need to think about 'algebraic effects' or anything like that. Your event handlers returns effects which is data. That's it.
The world moves forward via
Event dispatch
Event handling
Effect handling
Query
View
DOM
That's about enough complexity to deal with manipulation of a tree structure and getting some callbacks.
At least - given I've followed basically all JS frameworks-du-jour since jQuery- this is the simplest model that allows for complex UIs I encountered.
It certainly is opinionated and not completely pure - by design - but oh so sweet to work with.
- Twisol 6y ago> There's no need to think about 'algebraic effects' or anything like that. Re-frame itself would disagree with you -- although that may be because it does its job well enough that you've not needed to worry about algebraic effects. > Which brings us to the most important point: re-frame is impressively buzzword compliant. It has reactivity, unidirectional data flow, pristinely pure functions, interceptors, coeffects, conveyor belts, algebraic effects, statechart-friendliness and claims an immaculate hammock conception. Also, this page of documentation calls out effects and coeffects. https://day8.github.io/re-frame/EffectfulHandlers/#effects-and-coeffects https://day8.github.io/re-frame/EffectfulHandlers/#effects-a... I'm not quite fluent enough in Clojure to follow the examples, but it does look quite cool.