Teact: Hide memo debug in production (#6554)
This commit is contained in:
parent
ca9746bf74
commit
c891c4207b
@ -286,7 +286,8 @@ const DEBUG_components: AnyLiteral = { TOTAL: { name: 'TOTAL', renders: 0 } };
|
|||||||
const DEBUG_memos: Record<string, { key: string; calls: number; misses: number; hitRate: number }> = {};
|
const DEBUG_memos: Record<string, { key: string; calls: number; misses: number; hitRate: number }> = {};
|
||||||
const DEBUG_MEMOS_CALLS_THRESHOLD = 20;
|
const DEBUG_MEMOS_CALLS_THRESHOLD = 20;
|
||||||
|
|
||||||
document.addEventListener('dblclick', () => {
|
if (DEBUG) {
|
||||||
|
document.addEventListener('dblclick', () => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.warn('COMPONENTS', orderBy(
|
console.warn('COMPONENTS', orderBy(
|
||||||
Object
|
Object
|
||||||
@ -307,7 +308,8 @@ document.addEventListener('dblclick', () => {
|
|||||||
'hitRate',
|
'hitRate',
|
||||||
'asc',
|
'asc',
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let instancesPendingUpdate = new Set<ComponentInstance>();
|
let instancesPendingUpdate = new Set<ComponentInstance>();
|
||||||
let idsToExcludeFromUpdate = new Set<number>();
|
let idsToExcludeFromUpdate = new Set<number>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user