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

6 lines
270 B
TypeScript
Raw Permalink Normal View History

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