Advanced destructuring and namespaces
In this section, we'll dig further into ClojureScript's destructuring syntax. We'll also learn about ClojureScript namespaces. If you're familiar with JavaScript ES6 modules, namespaces are sort of akin to that-they're essentially modules within which variable and function definitions are located and a collection of imported libraries can be defined, often with local bindings for convenience.
Destructuring
Destructuring in ClojureScript provides a way of binding values to local variables. We've already seen a few simple examples of how this works with the code in previous sections, but destructuring in ClojureScript is extremely powerful and so comprehensive that it's worth looking at some more advanced patterns ...
Get Learning ClojureScript 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.