You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-30 23:44:55 +02:00
18 lines
439 B
TypeScript
18 lines
439 B
TypeScript
// Use this to show which props have been changed within a component.
|
|
//
|
|
// Usage: usePropsDebugger(props);
|
|
|
|
import useEffectDebugger from './useEffectDebugger';
|
|
|
|
export default function usePropsDebugger(props:any) {
|
|
const dependencies:any[] = [];
|
|
const dependencyNames:string[] = [];
|
|
|
|
for (const k in props) {
|
|
dependencies.push(props[k]);
|
|
dependencyNames.push(k);
|
|
}
|
|
|
|
useEffectDebugger(() => {}, dependencies, dependencyNames);
|
|
}
|