mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-22 23:08:20 +00:00
Version 0.8.0
This commit is contained in:
parent
95a1c4ee2b
commit
8cf42f57f5
@ -11,7 +11,7 @@ Some may even find these new features useful.
|
||||
|
||||
Joking aside, this is a substantial release which will change how you use re-frame.
|
||||
|
||||
##### Headline
|
||||
#### Headline
|
||||
|
||||
- re-frame subscriptions are now de-duplicated. As a result,
|
||||
many Signal graphs will be more efficient. The new behaviour better
|
||||
@ -100,7 +100,7 @@ Joking aside, this is a substantial release which will change how you use re-fra
|
||||
- we now have a logo designed by Sketch Maester @martinklepsch. Thank you Martin! But remember, no
|
||||
good deed ever goes unpunished - we'll be pestering you every time from now on :-)
|
||||
|
||||
##### Breaking
|
||||
#### Breaking
|
||||
|
||||
- requires Reagent >= v0.6.0
|
||||
|
||||
@ -151,7 +151,7 @@ Joking aside, this is a substantial release which will change how you use re-fra
|
||||
(defn my-logger [& args] (do-something-with (apply str args))
|
||||
```
|
||||
|
||||
##### Improvements
|
||||
#### Improvements
|
||||
|
||||
- Bug fix: `post-event-callbacks` were not called when `dispatch-sync` was called.
|
||||
- added new API `re-frame.core/clear-post-event-callback` which de-registers a callback
|
||||
|
@ -2,7 +2,7 @@
|
||||
:dependencies [[org.clojure/clojure "1.8.0"]
|
||||
[org.clojure/clojurescript "1.9.89"]
|
||||
[reagent "0.6.0-rc"]
|
||||
[re-frame "0.8.0-alpha4"]]
|
||||
[re-frame "0.8.0"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.1.3"]
|
||||
[lein-figwheel "0.5.4-7"]]
|
||||
|
@ -2,8 +2,8 @@
|
||||
:dependencies [[org.clojure/clojure "1.8.0"]
|
||||
[org.clojure/clojurescript "1.9.89"]
|
||||
[reagent "0.6.0-rc"]
|
||||
[re-frame "0.8.0-alpha4"]
|
||||
[binaryage/devtools "0.7.0"]
|
||||
[re-frame "0.8.0-SNAPSHOT"]
|
||||
[binaryage/devtools "0.8.1"]
|
||||
[secretary "1.2.3"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.1.3"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
(defproject re-frame "0.8.0-alpha12"
|
||||
(defproject re-frame "0.8.0"
|
||||
:description "A Clojurescript MVC-like Framework For Writing SPAs Using Reagent."
|
||||
:url "https://github.com/Day8/re-frame.git"
|
||||
:license {:name "MIT"}
|
||||
|
@ -1,7 +1,8 @@
|
||||
(ns re-frame.core
|
||||
(:require
|
||||
[re-frame.events :as events]
|
||||
[re-frame.subs :as subs]
|
||||
[re-frame.subs :as subs]
|
||||
[re-frame.interop :as interop]
|
||||
[re-frame.db :as db]
|
||||
[re-frame.fx :as fx]
|
||||
[re-frame.cofx :as cofx]
|
||||
@ -118,9 +119,19 @@
|
||||
"
|
||||
[]
|
||||
(let [handlers @registrar/kind->id->handler
|
||||
app-db @db/app-db]
|
||||
app-db @db/app-db
|
||||
subs-cache @subs/query->reaction]
|
||||
(fn []
|
||||
; XXX
|
||||
;; call `dispose!` on all current subscriptions which
|
||||
;; didn't originally exist.
|
||||
#_(->> subs/query->reaction
|
||||
vals
|
||||
(remove (set (vals subs-cache))) ;;
|
||||
(map interop/dispose!)
|
||||
(doall))
|
||||
|
||||
;; reset the atoms
|
||||
(reset! subs/query->reaction subs-cache)
|
||||
(reset! registrar/kind->id->handler handlers)
|
||||
(reset! db/app-db app-db)
|
||||
nil)))
|
||||
|
@ -61,6 +61,11 @@
|
||||
[a-ratom f]
|
||||
nil)
|
||||
|
||||
(defn dispose! [a-ratom]
|
||||
"No-op in JVM Clojure, since for testing purposes, we don't care about
|
||||
releasing resources for efficiency purposes."
|
||||
nil)
|
||||
|
||||
(defn set-timeout!
|
||||
"Note that we ignore the `ms` value and just invoke the function, because
|
||||
there isn't often much point firing a timed event in a test."
|
||||
|
@ -31,5 +31,8 @@
|
||||
(defn add-on-dispose! [a-ratom f]
|
||||
(reagent.ratom/add-on-dispose! a-ratom f))
|
||||
|
||||
(defn dispose! [a-ratom]
|
||||
(reagent.ratom/dispose! a-ratom))
|
||||
|
||||
(defn set-timeout! [f ms]
|
||||
(js/setTimeout f ms))
|
||||
|
Loading…
x
Reference in New Issue
Block a user