@shopify/react-performance
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -14,10 +14,8 @@ 'use strict'; | ||
} | ||
const cleanup = callback(performance); | ||
if (cleanup) { | ||
return cleanup; | ||
} | ||
return undefined; // eslint-disable-next-line react-hooks/exhaustive-deps | ||
return undefined; | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [performance, ...dependencies]); | ||
@@ -24,0 +22,0 @@ } |
@@ -15,3 +15,2 @@ 'use strict'; | ||
} | ||
performance.mark(stage, id); | ||
@@ -18,0 +17,0 @@ }, [stage, id]); |
@@ -23,3 +23,2 @@ 'use strict'; | ||
} | ||
timeout.current = setTimeout(async () => { | ||
@@ -30,3 +29,2 @@ if (timeout.current) { | ||
} | ||
try { | ||
@@ -65,3 +63,2 @@ await fetch(url, { | ||
} | ||
navigations.current.push(navigation); | ||
@@ -77,16 +74,13 @@ sendReport(); | ||
} | ||
function serializableClone(object) { | ||
const output = {}; // We explicitly want to copy the inherited properties | ||
const output = {}; | ||
// We explicitly want to copy the inherited properties | ||
// eslint-disable-next-line guard-for-in | ||
for (const key in object) { | ||
output[key] = object[key]; | ||
} | ||
return output; | ||
} | ||
function noop() {} | ||
exports.usePerformanceReport = usePerformanceReport; |
@@ -6,3 +6,2 @@ 'use strict'; | ||
exports.Stage = void 0; | ||
(function (Stage) { | ||
@@ -9,0 +8,0 @@ Stage["Complete"] = "complete"; |
{ | ||
"name": "@shopify/react-performance", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"license": "MIT", | ||
@@ -33,3 +33,3 @@ "description": "Primitives to measure your React application's performance using `@shopify/performance`", | ||
"devDependencies": { | ||
"@shopify/jest-dom-mocks": "^5.0.0", | ||
"@shopify/jest-dom-mocks": "^5.0.1", | ||
"@shopify/network": "^3.2.1" | ||
@@ -36,0 +36,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
471
41354