From 26a1e3a7a08e4b0fdb4dfcc3ed6a6cc21bcef104 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 15 Nov 2023 17:15:20 +0100
Subject: refactor(hooks): remove unused hooks

* useMutationObserver removed
* useStateChange removed
---
 src/utils/hooks/use-state-change.tsx | 17 -----------------
 1 file changed, 17 deletions(-)
 delete mode 100644 src/utils/hooks/use-state-change.tsx

(limited to 'src/utils/hooks/use-state-change.tsx')

diff --git a/src/utils/hooks/use-state-change.tsx b/src/utils/hooks/use-state-change.tsx
deleted file mode 100644
index 59ae0df..0000000
--- a/src/utils/hooks/use-state-change.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import { useEffect, useState } from 'react';
-
-/**
- * Use React useState hook and update it if initial data change.
- *
- * @param initial - The initial value.
- * @returns The state and a setter.
- */
-export const useStateChange = <T,>(initial: T) => {
-  const [state, setState] = useState<T>(initial);
-
-  useEffect(() => {
-    setState(initial);
-  }, [initial]);
-
-  return [state, setState] as const;
-};
-- 
cgit v1.2.3

