Fredrik Dyrkell wrote a very nice binary clock using Om. I thought I’d replicate that using Reagent for fun (another re-write, using Hoplon, can be seen here).
So, without further ado, here is a binary clock using Reagent.
Read moreCalling a component in Reagent looks a lot like a function call. Now it also works like one.
Before 0.4.0, component functions were always called with three arguments: a map of attributes, a vector of ”children”, and the current React component.
This was confusing, and an unnecessary limitation, so now component functions get exactly the same arguments you pass to them.
Read moreReagent already separates state from components. Now they are also separated in time.
From version 0.3.0, changes in application state (as
represented by Reagent’s atom
s) are no longer
rendered immediately to the DOM. Instead, Reagent waits until
the browser is ready to repaint the window, and then all the
changes are rendered in one single go.
It turns out that ”Cloact” was a really, really bad name. It made some people think about birds’ behinds, in possibly unhealthy ways, which even Google suggested they should.
The new name is Reagent, which hopefully doesn’t bring with it the same disgusting connotations.
The API is otherwise unchanged, so a simple search-and-replace should suffice.
Read more