react-dev-inspector
Version:
dev-tool for inspect react components and jump to local IDE for component code.
10 lines (9 loc) • 426 B
TypeScript
/**
* Simple but not robust implement of React18 experimental hook `useEffectEvent`,
* to keep compatible with other React versions.
*
* for some more robust implements, you can see:
* - `useEvent` in https://github.com/scottrippey/react-use-event-hook
* - `useMemoizedFn` in https://github.com/alibaba/hooks
*/
export declare const useEffectEvent: <T extends (...args: any[]) => any>(callback?: T | undefined) => T;