Skip to content

Commit 474a79d

Browse files
committed
core.Base: isDestroying_ reactive config #6977
1 parent 5ae9c63 commit 474a79d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/core/Base.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,19 @@ class Base {
9999
* @protected
100100
*/
101101
isConstructed: false,
102+
/**
103+
* This config will be set to `true` as the very first action within the `destroy()` method.
104+
* Effects can observe this config to clean themselves up.
105+
* @member {Boolean} isDestroying_=false
106+
* @protected
107+
*/
108+
isDestroying_: false,
102109
/**
103110
* The config will get set to `true` once the Promise of `async initAsync()` is resolved.
104111
* You can use `afterSetIsReady()` to get notified once the ready state is reached.
105112
* Since not all classes use the Observable mixin, Neo will not fire an event.
106113
* method body.
107-
* @member {Boolean} isReady=false
114+
* @member {Boolean} isReady_=false
108115
*/
109116
isReady_: false,
110117
/**
@@ -393,6 +400,8 @@ class Base {
393400
destroy() {
394401
let me = this;
395402

403+
me.isDestroying = true;
404+
396405
me.#timeoutIds.forEach(id => {
397406
clearTimeout(id)
398407
});

0 commit comments

Comments
 (0)