PromoCursed/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.d.ts
2024-08-20 23:25:37 +04:00

11 lines
507 B
TypeScript

import type { EffectCallback } from 'react';
import * as React from 'react';
type UseCompatibleInsertionEffect = (renderEffect: EffectCallback, effect: (polyfill?: boolean) => ReturnType<EffectCallback>, deps: React.DependencyList) => void;
/**
* Compatible `useInsertionEffect`
* will use `useInsertionEffect` if React version >= 18,
* otherwise use `useInsertionEffectPolyfill`.
*/
declare const useCompatibleInsertionEffect: UseCompatibleInsertionEffect;
export default useCompatibleInsertionEffect;