Optional
dependencyNames: string[] = [] //original code
useEffect(()=>{
//any code
},[dep1, dep2])
//original code
useEffectDebugger(()=>{
//debugging code
},[dep1, dep2],["dep1","dep2"])
inspired from https://stackoverflow.com/questions/55187563/determine-which-dependency-array-variable-caused-useeffect-hook-to-fire
Generated using TypeDoc
hook used tu replace 'useEffect' for getting debug information which dependency change caused the useEffect call. Add an additional string[] with the dependency names as last array to get more readable logs.