Skip to content

Instantly share code, notes, and snippets.

View latobibor's full-sized avatar
🎯
Focusing

András Tóth latobibor

🎯
Focusing
  • Budapest
View GitHub Profile
@latobibor
latobibor / use-dependency-spy.ts
Last active January 20, 2024 02:07
React dependency spy
/**
* Ever wondered what triggered a rerendering in React?
* Who was the killer? Which dependency got updated?
* This is a very stupid little code that can help you debug the issue.
*/
import { useRef } from 'react';
type DependenciesObject = {
[dependencyName: string]: any;