cljs is improving at a really great pace. Unfortunately, that means great blog posts can quickly go stale and leave out some new, useful functionality. Surely cljs would benefit from a nice, official reference that was a well-known starting point for aspiring (and always improving) cljs devs.

Thankfully, Shaun Lebron (and others) has started work on creating a great site for cljs, complete with useful, up-to-date documentation. Specifically, the api-refs are already functional and useful for reference or simply exploring the functionality of cljs.

A really nice addition is the offline doc-set for Dash (or Zeal/Velocity for Linux/Windows). With the doc-set, you get a list of all cljs core functions with:

  1. name
  2. type (e.g. function or macro)
  3. version history
  4. docs
  5. source code

A tip on using the docs

When I first started learning clojure, I’d spend time just reading through the clojure api. clj/cljs has a lot of built-in functionality that covers a wide range of use cases. More than once, I’ve started (or finished) implementing something, only to later find out I could have made a simple function call.

True story: Earlier this week, I was talking to a friend about cljs and needing to generate UUIDs. It was strange to me that cljs has a UUID type, but not a built-in fn for generating UUIDs. While randomly looking through the docs, I see that random-uuid got added to cljs in the latest release.

If you have some time to kill before a meeting, or are looking to be productive on a Friday afternoon, spend some time just reading through the docs. It will go a long way in improving your cljs skills.

Get access to new content

New posts are at bostonou.com. Go check it out, or you can just subscribe from here.

    Reminder: You're subscribing to bostonou.com