Updated structure

This commit is contained in:
2026-01-09 19:56:44 +01:00
parent 6a7ea0cd8d
commit 5c4526e578
11 changed files with 197 additions and 169 deletions
+3 -2
View File
@@ -1,7 +1,7 @@
import { useEffect, useRef } from "react";
export function useEffectOnceWhenReady(
effect: () => void,
effect: () => any,
deps: any[],
testers: (undefined | ((m: any) => boolean))[]
) {
@@ -13,6 +13,7 @@ export function useEffectOnceWhenReady(
);
if (!allReady || hasRun.current) return;
hasRun.current = true;
effect();
return effect();
}, deps);
}