Improvements:
- fix #65 - Detect mistaken use of middleware factories
- examples/
now work with figwheel
Headline: - Exceptions in event handlers no longer break the router loop. Previously, any exception in an event handler broke the app permanently. This change will: - improve the debugging experience with figwheel - mean apps, in production, stand a chance of reporting UHE to the user, and can perhaps even recover to a sane state. - #53 Fix Logging And Error Reporting You can now provide your own logging fucntions. Further explanation here.
Deprecated:
- log-ex
middleware is no longer needed. Simply remove its use.
Sometime in the last couple of months, changes to the CLJS
runtime meant that useful exceptions could escape go-loops, and
good stack traces appear (at least in Chrome).
New Features:
- #52 Add a way to purge redos (dispatch [:purge-redos])
When trying to recover from an UHE, do an undo to get back to the
last sane state, and then use this new feature to purge the
just-generated-redo.
- #43 Add ability to clear handlers (event and subs) via
two new API functions:
- re-frame.core/clear-sub-handlers!
- re-frame.core/clear-event-handlers!
Useful for those using the ClojureScript fork of Component.
Experimental:
- #50 Add "reaction-like" middleware called on-changes
.
Other: - improve some comments in todomvc example
Improvements: - Fix #42 - Put in checks for dispatch-sync - Fix #49 - add table of content and link to wiki for middleware - Fix #46 - Minor typos fixed
Various small improvements and bug fixes:
after
and enrich
now call the supplied function f
with
both db
and v
(previously just db
). Because javascript is so forgiving
about function arity, this change is backwards compatible.log-ex
for correctly printing handler stacktraces.
See explanation.Renames:
- register-pure-handler
renamed to register-handler
(and existing low level register-handler
becomes register-handler-base
but is not a part of the API).
- remove apply-event
middleware and replace with similar trim-v
- rename register-subs
to register-sub
(avoid confusion over possible plurals)
- rename set-max-undos
to set-max-undos!
Changes:
- undoable
middleware is now a factory. Where before you used this undoable
,
you must now use this (undoable "some explanation")
. See further below.
todomvc
available in examples folder.debug
, enrich
and after
The undo/redo feature built into re-frame is now more functional (at the cost of a breaking change).
There is now an explanation associated with each undo state describing modification. This allows an app to inform the user what actions they will be undoing or redoing.
Previously undoable
was simply middleware, but it is now a middleware factory.
Essentially, that means you can't use it "plain" anymore, and instead you must
call it, like this (undoable "Some explanation")
The explanation
provided to undoable must be either a string
(static
explanation) or a function (db event) -> string
, allowing you to customize
the undo message based on details of the event.