From 6250c584dabd93affec0ea42948fc93fa4df2f99 Mon Sep 17 00:00:00 2001 From: Mike Thompson Date: Tue, 14 Jun 2016 21:09:21 +1000 Subject: [PATCH] Add undo API --- src/re_frame/core.cljs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/re_frame/core.cljs b/src/re_frame/core.cljs index 6310885..4907c2f 100644 --- a/src/re_frame/core.cljs +++ b/src/re_frame/core.cljs @@ -4,6 +4,7 @@ [re-frame.subs :as subs] [re-frame.router :as router] [re-frame.utils :as utils] + [re-frame.undo :as undo] [re-frame.middleware :as middleware])) @@ -23,7 +24,6 @@ (def pure middleware/pure) (def debug middleware/debug) -(def undoable middleware/undoable) (def path middleware/path) (def enrich middleware/enrich) (def trim-v middleware/trim-v) @@ -31,6 +31,17 @@ (def on-changes middleware/on-changes) +;; -- Undo API ----- +;; +;; https://github.com/Day8/re-frame/wiki/Undo-&-Redo + + +(def undoable undo/undoable) +(def set-max-undos! undo/set-max-undos!) +(def set-undo-path! undo/set-undo-path!) + + + ;; -- Logging ----- ;; re-frame uses the logging functions: warn, log, error, group and groupEnd ;; By default, these functions map directly to the js/console implementations,