[Debug] Teact: Better logging
This commit is contained in:
parent
1597f2ad2f
commit
d9733e6466
@ -588,18 +588,18 @@ function useLayoutEffectBase(
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(`[Teact] Effect "${debugKey}" caused by dependencies.`, causedBy.join(', '));
|
||||||
'[Teact]',
|
|
||||||
debugKey,
|
|
||||||
'Effect caused by dependencies.',
|
|
||||||
causedBy.join(', '),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
primarySchedulerFn(execCleanup);
|
primarySchedulerFn(execCleanup);
|
||||||
schedulerFn(exec);
|
schedulerFn(exec);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (debugKey) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(`[Teact] Effect "${debugKey}" caused by missing dependencies.`);
|
||||||
|
}
|
||||||
|
|
||||||
primarySchedulerFn(execCleanup);
|
primarySchedulerFn(execCleanup);
|
||||||
schedulerFn(exec);
|
schedulerFn(exec);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user