Merge branch 'master' into develop

This commit is contained in:
Daniel Compton 2017-08-16 14:50:41 +12:00
commit b276c4033c
3 changed files with 8 additions and 3 deletions

View File

@ -23,6 +23,7 @@
#### Minor Fixes and Improvements
- [#400](https://github.com/Day8/re-frame/pull/400) Improve error message when a registered cofx can't be found
- The effect handler for `:dispatch-n` will now ignore `nils`. [See checkin](https://github.com/Day8/re-frame/commit/6efdae438f393f8121a2d6dfbf76db00e6dafbf5)
- [#340](https://github.com/Day8/re-frame/pull/340)
- [#341](https://github.com/Day8/re-frame/pull/341) Fix `re-frame.core/on-changes` to work even if event handler does not set `:db`.

View File

@ -62,7 +62,7 @@ informal description, and here it is ... for this app `app-db` will contain
a two-key map like this:
```cljs
{:time (js/Date.) ;; current time for display
:time-color "#f88"} ;; the colour in which the time should be be shown
:time-color "#f88"} ;; the colour in which the time should be shown
```
re-frame itself owns/manages `app-db` (see FAQ #1), and it will

View File

@ -83,13 +83,17 @@
:id :coeffects
:before (fn coeffects-before
[context]
(update context :coeffects (get-handler kind id)))))
(if-let [handler (get-handler kind id)]
(update context handler :coeffects)
(console :error "No cofx handler registered for \"" id "\"")))))
([id value]
(->interceptor
:id :coeffects
:before (fn coeffects-before
[context]
(update context :coeffects (get-handler kind id) value)))))
(if-let [handler (get-handler kind id)]
(update context :coeffects handler value)
(console :error "No cofx handler registered for \"" id "\""))))))
;; -- Builtin CoEffects Handlers ---------------------------------------------