News in 0.6.0-alpha
Reagent 0.6.0-alpha contains new reactivity helpers, better
integration with native React components, a new version of
React (0.14.3), new React dependencies (react-dom
and react-dom-server
), better performance, and much
more.
This is a quite big release, so it probably contains a fair amount of bugs as well…
Read moreNews in 0.5.1
Reagent 0.5.1 contains a new convenient shortcut for nested elements, better error messages, new logic for maintaining cursor position in inputs, a new version of React, and some bug fixes and improvements.
Read moreNews in 0.5.0
Reagent 0.5.0 has automatic importing of React.js, two kinds of cursors, better integration of native React components, better performance, easier integration with e.g Figwheel, and more.
Read moreA binary clock
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 moreAll arguments allowed
If it looks like a function…
Calling 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 moreFaster by waiting
Reagent gets async rendering
Reagent 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.
Cloact becomes Reagent: Undo is trivial
(reset! cloact-name "Reagent")
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