You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand the source correctly, this is because the derivatives mixin always includes unmount code. You can call the custom will-unmount before the derivatives mixin, but as a project gets more complex, it could lead to code that is difficult to reason about. Something more explicit could be worth exploring.
I have two suggestions:
Split the derivatives mixin into separate mount and unmount functions/vars
Include an optional will-unmount hook into the d/drv mixin that will get called before the mixin executes its own unmount.
The text was updated successfully, but these errors were encountered:
On Mon, Jun 5, 2017, 23:15 Levi Tan Ong ***@***.***> wrote:
Affects get-ref.
If I understand the source correctly, this is because the derivatives
mixin always includes unmount code. You can call the custom will-unmount
before the derivatives mixin, but as a project gets more complex, it could
lead to code that is difficult to reason about. Something more explicit
could be worth exploring.
I have two suggestions:
1. Split the derivatives mixin into separate mount and unmount
functions/vars
2. Include an optional will-unmount hook into the d/drv mixin that
will get called before the mixin executes its own unmount.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAF82BMlgHwozS-2AXC3PRMjavKqzWNhks5sBCmogaJpZM4NwQU0>
.
Sorry for taking so long, I've been quite busy these past few days.
(defcssample<rum/reactive
(d/drv:app/data)
#?(:cljs
{:will-mount (fn [state]
;; we have access to derivatives
state)
:will-unmount (fn [state]
;; no access to derivatives
state)})
[state]
nil)
Affects
get-ref
.If I understand the source correctly, this is because the derivatives mixin always includes unmount code. You can call the custom
will-unmount
before the derivatives mixin, but as a project gets more complex, it could lead to code that is difficult to reason about. Something more explicit could be worth exploring.I have two suggestions:
will-unmount
hook into thed/drv
mixin that will get called before the mixin executes its own unmount.The text was updated successfully, but these errors were encountered: