5 ms·
Freactive: A high-performance declarative DOM library in ClojureScript
- amelius 12y agoInteresting. Two questions: 1. Why only target this at the DOM? It seems to me that a reactive library could be useful for anything. 2. When a change occurs, is the subsequent chain-reaction performed in a performance-optimal way?
- aaroncr 12y ago1. The goal is actually to target several platforms. The data types are also implemented for Java Clojure and currently being used for JavaFX in fx-clj. I actually did propose doing this in a general way here: https://github.com/aaronc/freactive.core/blob/master/UI-SPEC.md https://github.com/aaronc/freactive.core/blob/master/UI-SPEC... and started making a separate lib for just the data types: https://github.com/aaronc/freactive.core https://github.com/aaronc/freactive.core. The idea is to make it easy to work with many platforms. 2. That's the idea. Did you check to the performance demo (http://aaronc.github.io/freactive/dom-perf/ http://aaronc.github.io/freactive/dom-perf/)? I can't claim all the kinks have been ironed out... but the idea is to optimize performance. Overall, I can't really say the idea of a reactive UI library for Clojure is anything new - this library is simply a pure Clojurescript (as opposed to React.js-based) library that aims to have have good performance and a simple and consistent programming model. Doing it in pure Clojurescript I think makes it easy to optimize performance, support complex animations and do things in a Clojure-like way.