[REF] component: remove onDestroyed, implement onWillDestroy

This commit is contained in:
Géry Debongnie
2021-11-29 14:06:53 +01:00
committed by Aaron Bohy
parent 8c600fa539
commit 779003e715
10 changed files with 83 additions and 117 deletions
+2 -2
View File
@@ -35,9 +35,9 @@ export function onWillUnmount(fn: () => Promise<void> | void | any) {
node.willUnmount.unshift(fn);
}
export function onDestroyed(fn: () => Promise<void> | void | any) {
export function onWillDestroy(fn: () => Promise<void> | void | any) {
const node = getCurrent()!;
node.destroyed.push(fn);
node.willDestroy.push(fn);
}
export function onWillRender(fn: () => void | any) {