MCPcopy
hub / github.com/preactjs/preact / argsChanged

Function argsChanged

hooks/src/index.js:533–539  ·  view source on GitHub ↗

* @param {unknown[]} oldArgs * @param {unknown[]} newArgs * @returns {boolean}

(oldArgs, newArgs)

Source from the content-addressed store, hash-verified

531 * @returns {boolean}
532 */
533function argsChanged(oldArgs, newArgs) {
534 return (
535 !oldArgs ||
536 oldArgs.length !== newArgs.length ||
537 newArgs.some((arg, index) => arg !== oldArgs[index])
538 );
539}
540
541/**
542 * @template Arg

Callers 3

useEffectFunction · 0.85
useLayoutEffectFunction · 0.85
useMemoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…