This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Hello, I want to change an atom only when another atom changes value, ho wdo I do that? For example, I have a value
I also have children that are
(let [button-disabled? (r/atom true)])
When one of them turns false, I want to change the main one.
(let [email-button-disabled? (r/atom true) number-button-disabled? (r/atom true)])
it looks like those are not normal Clojure atoms but atoms from reagent library. if that is the case then look at reactions provided by reagent https://github.com/reagent-project/reagent/blob/master/doc/ManagingState.md#reactions
also there is #C0620C0C8 channel
Add-watch will work too I believe! But reactions are nice of course