mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
14 lines
348 B
TypeScript
14 lines
348 B
TypeScript
|
import useEffectDebugger from './useEffectDebugger';
|
||
|
|
||
|
export default function usePropsDebugger(effectHook:any, props:any) {
|
||
|
const dependencies:any[] = [];
|
||
|
const dependencyNames:string[] = [];
|
||
|
|
||
|
for (const k in props) {
|
||
|
dependencies.push(props[k]);
|
||
|
dependencyNames.push(k);
|
||
|
}
|
||
|
|
||
|
useEffectDebugger(effectHook, dependencies, dependencyNames);
|
||
|
}
|