Skip to content

Instantly share code, notes, and snippets.

@rburgst
rburgst / use-what-changed.tsx
Created October 19, 2022 12:49
use-what-changed preact version
/* eslint-disable no-console */
import type { RefObject } from 'preact';
import React from 'preact/compat';
/**
* Stolen from https://github.com/simbathesailor/use-what-changed/blob/master/src/useWhatChanged.tsx
*/
type TypeDependency = any[];
type TypeDependencyNames = string;