Creating JS data structures, using #js and js-interop


I’ve written a short guide to creating JavaScript data structures in ClojureScript:

I start by exploring the built-in #js tag, then review the obj and lit tools in the js-interop library.

The article compares how each form compiles to raw JavaScript. To make this possible, I added a js-source form to Maria, so that one can see the javascript emitted by an expression. (Previously there was a command for this, but one couldn’t do it programmatically.)