Hello there!

https://github.com/Frozenlock/historian


One of the big sales pitch of React.js (and cljs immutable data structure) 
is how it enables us to easily make 'undo'.

Here's a library that does just that.
You tell it which atom(s) you want to be able to undo/redo and it will keep 
track of them.

For example:

(def my-state (atom "ABC"))

(hist/record! my-state :my-state)
;; then change the state of your atom
(reset! my-state "DEF")
@my-state=> "DEF"
(hist/undo!)
@my-state=> "ABC"
(hist/redo!)
@my-state=> "DEF"
;; tada!



Cheers!









-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to