@homebound/beam 2.244.3 → 2.244.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,6 +43,10 @@ function useComputed(fn, deps) {
|
|
|
43
43
|
});
|
|
44
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
45
|
}, deps);
|
|
46
|
+
// unsubscribe the autorun when we're unmounted
|
|
47
|
+
(0, react_1.useEffect)(() => {
|
|
48
|
+
return ref.current.runner;
|
|
49
|
+
}, []);
|
|
46
50
|
// Occasionally autorun will not have run yet, in which case we have to just
|
|
47
51
|
// accept running the eval fn twice (here to get the value for the 1st render,
|
|
48
52
|
// and again for mobx to watch what observables we touch).
|