Closed shaunlebron closed 1 year ago
Also, @holmsand, could you explain the purpose of this branch?
(if (and non-reactive (nil? auto-run)) ;; <-- what exactly does this mean?
…
(._run …))
edit: nevermind, it makes sense now. I refactored this to use an affirmative condition. deref only uses _run
in a reactive context or when auto-run
is set:
(if (or (reactive?) auto-run)
(._run …)
…)
I’ll start a new PR to clarify these extra changes. (Moved to #578)
After having trouble understanding all the branches inside the Reaction Deref function, I pulled the
notify-deref-watcher!
before the dirty check, so we can combine both dirty checks. Please verify that this is equivalent and easier to follow!