File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ We use [Break Versioning][breakver]. The version numbers follow a `<major>.<mino
1414
1515Signaali is currently [ experimental] ( https://github.com/topics/metosin-experimental ) .
1616
17+ ## Unreleased
18+
19+ ### Fixed
20+
21+ - ` reset! ` and ` swap! ` on a ReactiveNode returns a value similar to when applied to an atom.
22+
1723## 0.1.0
1824
1925First release! 🎉
Original file line number Diff line number Diff line change 1212[ ![ Slack] ( https://img.shields.io/badge/slack-signaali-orange.svg?logo=slack )] ( https://clojurians.slack.com/app_redirect?channel=signaali )
1313[ ![ cljdoc badge] ( https://cljdoc.org/badge/fi.metosin/signaali )] ( https://cljdoc.org/d/fi.metosin/signaali )
1414
15- Signaali is currently [ experimental] ( https://github.com/topics/ metosin- experimental ) .
15+ Signaali is currently [ experimental] ( https://github.com/metosin/open-source/blob/main/project-status.md# experimental ) .
1616It works and currently has no known bugs (if you find some, please file an issue),
1717but we might change its API or namespaces to make it reach maturity.
1818
Original file line number Diff line number Diff line change 150150 (when (or (nil? propagation-filter-fn)
151151 (propagation-filter-fn value new-value))
152152 (set! value new-value)
153- (notify-signal-watchers this true )))
153+ (notify-signal-watchers this true ))
154+ new-value)
154155 ,]
155156
156157 :clj [IAtom
170171 (reset [this ^Object new-value]
171172 (when (or (nil? propagation-filter-fn)
172173 (propagation-filter-fn value new-value))
173- (-set-value! this new-value)
174- (notify-signal-watchers this true )))
174+ (set! value new-value)
175+ (notify-signal-watchers this true ))
176+ new-value)
175177 ,])
176178
177179 IDeref
Original file line number Diff line number Diff line change 1313 (let [x (sr/create-signal 1 )]
1414 (is (= 1 @x))
1515
16- (reset! x 5 )
16+ (let [a (reset! x 5 )]
17+ (is (= a 5 )))
1718 (is (= 5 @x))
1819
19- (swap! x inc)
20+ (let [a (swap! x inc)]
21+ (is (= a 6 )))
2022 (is (= 6 @x)))))
2123
2224(deftest signal-test
You can’t perform that action at this time.
0 commit comments