UNPKG

reaflow

Version:

Node-based Visualizations for React

12 lines (11 loc) 525 B
export declare type noop = (...args: any[]) => any; /** * Stable callback * * References: * - https://github.com/facebook/react/issues/14099 * - https://reactjs.org/docs/hooks-faq.html#how-to-read-an-often-changing-value-from-usecallback * - https://gist.github.com/rolandcoops/4364be2eff3586b0f8f3d0c10dc3be61 * - https://github.com/alibaba/hooks/blob/master/packages/hooks/src/usePersistFn/index.ts */ export declare function useEventCallback(fn: noop, dependencies: any[]): (...args: any[]) => any;