关于clojurescript+phantomjs+react的一些探索

这两天需要使用phantomjs+react生成些图片

React->Clojurescript:

最开始发现clojurescript中包裹react的还挺多:

https://github.com/omcljs/om

http://holmsand.github.io/reagent/

https://github.com/levand/quiescent

在quiescent的主页上上有一些对OM和reagent的对比

这里是OM和Reagent的一些对比

quiescent是其中最轻量级的方案,只需要关心shouldComponentUpdate和render就可以了

另外还有模仿react做的一些库:

https://github.com/lynaghk/c2

 Phantomjs->Nodejs->Clojurescript:

使用brew install phantomjs && npm install phantom/node-phantom

搭建环境:

在搭建过程中发现 :preamble ["reagent/react.js"] 与 :optimizations :none 冲突

所以就不使用:preamble,转而在网页内载入react.js文件

原文地址:https://www.cnblogs.com/TLightSky/p/4271919.html