misc_pterodactyl-panel/resources/scripts/plugins/useDeepCompareEffect.ts

5 lines
270 B
TypeScript

import { DependencyList, EffectCallback, useEffect } from 'react';
import { useDeepMemoize } from './useDeepMemoize';
export const useDeepCompareEffect = (callback: EffectCallback, dependencies: DependencyList) =>
useEffect(callback, useDeepMemoize(dependencies));