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

clojurescript
#1

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

https://www.maria.cloud/gist/9a8bf3d923a856ba222adccc2f737fbf?eval=true

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.)

8 Likes