mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-24 07:48:14 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
b276c4033c
@ -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`.
|
||||
|
@ -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
|
||||
|
@ -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 ---------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user