relay-nextjs
Advanced tools
Comparing version 0.10.0 to 0.10.1
{ | ||
"name": "relay-nextjs", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Use Relay in your Next.js apps!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,7 +47,11 @@ "use strict"; | ||
const initialQueryVars = react_1.useRef(queryVariables); | ||
const latch = react_1.useRef(false); | ||
return react_1.useMemo(() => { | ||
if (latch.current) | ||
return latch.current; | ||
// Shallow comparison of `initialQueryVars` and `queryVariables`. | ||
return !Object.keys(queryVariables).every((key) => | ||
latch.current = !Object.keys(queryVariables).every((key) => | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
queryVariables[key] === initialQueryVars.current[key]); | ||
return latch.current; | ||
}, [queryVariables]); | ||
@@ -54,0 +58,0 @@ } |
32290
462