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

6 lines
252 B
TypeScript
Raw Permalink Normal View History

import { DependencyList, useMemo } from 'react';
import { useDeepMemoize } from '@/plugins/useDeepMemoize';
export const useDeepCompareMemo = <T>(callback: () => T, dependencies: DependencyList) =>
useMemo(callback, useDeepMemoize(dependencies));