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

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

10 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.