@winglet/react-utils
Version:
React utility library providing custom hooks, higher-order components (HOCs), and utility functions to enhance React application development with improved reusability and functionality
9 lines (8 loc) • 447 B
TypeScript
import { type DependencyList } from 'react';
/**
* Executes an effect until a specified condition is met.
* The effect stops running once it returns true.
* @param effect - A function that returns a boolean indicating whether the condition is met
* @param dependencies - Dependency array for the effect
*/
export declare const useEffectUntil: <Dependencies extends DependencyList>(effect: () => boolean, dependencies?: Dependencies) => void;