ClojureScript Development Tools

We have a REPL set up on the back end, but all we have on the front end is recompilation. We can do better. To this end we’ll introduce two tools: shadow-cljs and re-frame-10x.

Shadow-cljs

Several tools other than lein-cljsbuild are available for adding ClojureScript support to a Clojure project. Let’s update our project to use shadow-cljs[53] to compile ClojureScript. Note that you’ll need to have NPM[54] installed before following along with this section. By switching to shadow-cljs, we’ll gain seamless integration with NPM modules and ClojureScript hot loading. Shadow-cljs watches your ClojureScript files and sends compiled changes to the browser through a WebSocket without requiring the browser to refresh. ...

Get Web Development with Clojure, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.