Appendix A. Libraries

Hopefully, this book has helped you to understand the basics of ClojureScript and how it works. But in order to build a real ClojureScript application, you’ll need more than the basics. You’ll need to manipulate the DOM. You’ll need to send and receive AJAX requests and long-poll messages. You’ll need to do drawing and visualizations.

Any one of these topics can be (and is) the subject of its own book, and unfortunately there isn’t room to cover them all adequately here. However, you already have all the tools you need: with ClojureScript’s capability to interoperate with JavaScript, you can access any JavaScript browser API, and consume any JavaScript library.

Additionally, despite the relative youth of ClojureScript, there is already a healthy crop of libraries designed not only to be compatible with ClojureScript, but to follow ClojureScript idioms and fit seamlessly into your application. Here, we will briefly introduce several of them to help give you an idea of the landscape.

ClojureScript’s Standard Library

Lots of things you might want to do are actually already included in ClojureScript. There are many library namespaces available besides just cljs.core.

cljs.reader

We covered the reader in Chapter 10. Unlike Clojure’s reader, the ClojureScript reader lives in a separate namespace.

clojure.set

Contains set manipulation functions such as union, intersection, difference, etc.

clojure.string

Contains a variety of useful string manipulation functions, including ...

Get ClojureScript: Up and Running 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.