1 export const debugChangedDeps = <T extends any[]>(
3 previousDeps: T | undefined,
4 dependencyNames?: string[],
7 const changedDeps = dependencies.reduce((accum: object, dependency, index) => {
8 if (dependency !== previousDeps?.[index]) {
9 const keyName = dependencyNames?.[index] || index;
13 before: previousDeps?.[index],
22 if (Object.keys(changedDeps).length) {
23 console.log(` [${logPrefix}-use-effect-debugger]`, changedDeps);