-
-
Save qleguennec/8972c880c8baa0e7dc3800ae3fec1737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defonce value-atom (r/atom nil)) | |
(re-frame/reg-sub | |
:test-reaction | |
(fn test-reaction-input [_] | |
value-atom) | |
(fn test-reaction [first-value] | |
(inc first-value))) | |
(r/track! | |
(fn [] | |
(println | |
@(re-frame/subscribe [:test-reaction])))) | |
(do | |
(re-frame/clear-subscription-cache!) | |
(reset! value-atom 42)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment