This commit is contained in:
QIDI TECH
2024-09-03 09:34:33 +08:00
parent 27f34aa3e8
commit 585146181b
5147 changed files with 1734881 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import { useEffect, useLayoutEffect } from 'react';
function useIsomorphicLayoutEffect(callback, deps) {
// eslint-disable-next-line
if (typeof window === 'undefined') return useEffect(callback, deps);
return useLayoutEffect(callback, deps);
}
export { useIsomorphicLayoutEffect };