mirror of https://github.com/buster-so/buster.git
10 lines
290 B
TypeScript
10 lines
290 B
TypeScript
import type { DependencyList } from 'react';
|
|
|
|
export function depsAreSame(oldDeps: DependencyList, deps: DependencyList): boolean {
|
|
if (oldDeps === deps) return true;
|
|
for (let i = 0; i < oldDeps.length; i++) {
|
|
if (!Object.is(oldDeps[i], deps[i])) return false;
|
|
}
|
|
return true;
|
|
}
|