import { Dispatch, SetStateAction } from 'react'; /** * Returns a stateful value updated by the outer value, and a function to update it. * * If the outer value changes, the internal state is updated to match it. * * This hook is useful for creating components that can be act uncontrolled * while still being able to respond to external changes. * * @param initialState - The initial state value or a function that returns the initial state. * @param dependency - The external value that controls the state. * @param identity - Optional function to compare previous and next dependency values. Defaults to `Object.is`. * @param effect - Optional effect function to run when the dependency changes. * * @returns A tuple containing the current state and a function to update it. */ export declare function useControlledState(initialState: S | (() => S), dependency: S | undefined, identity?: (previous: S | undefined, next: S | undefined) => boolean, effect?: () => void): [S, Dispatch>];