UNPKG

react-elegant-ui

Version:

Elegant UI components, made by BEM best practices for react

10 lines (9 loc) 394 B
import { DependencyList } from 'react'; /** * Return immutable wrapper for callback * * You can still redefine callback while updating props, but will get same object * * This especial useful to create callback for event handlers who required same object to remove */ export declare const useImmutableCallback: <T extends (...args: any[]) => any>(callback: T, deps: DependencyList) => T;