import { useCallback, useContext, useDebugValue, useErrorBoundary, useId, useMemo, useState as usePreactState, useImperativeHandle as usePreactUseImperativeHandle, useReducer, useRef } from 'preact/hooks'; import type { DependencyList, EffectCallback } from 'react'; declare const useState: typeof usePreactState; /** * Accepts a function that contains imperative, possibly effectful code. * The effects run after main thread dom update without blocking it. * * @param effect - Imperative function that can return a cleanup function * @param deps - If present, effect will only activate if the values in the list change (using ===). * * @public */ declare const useEffect: (effect: EffectCallback, deps?: DependencyList) => void; /** * `useLayoutEffect` is now an alias of `useEffect`. Use `useEffect` instead. * * Accepts a function that contains imperative, possibly effectful code. The effects run after main thread dom update without blocking it. * * @param effect - Imperative function that can return a cleanup function * @param deps - If present, effect will only activate if the values in the list change (using ===). * * @public * * @deprecated `useLayoutEffect` in the background thread cannot offer the precise timing for reading layout information and synchronously re-render, which is different from React. */ declare const useLayoutEffect: (effect: EffectCallback, deps?: DependencyList) => void; declare const useImperativeHandle: typeof usePreactUseImperativeHandle; export { useState, useReducer, useRef, useImperativeHandle, useLayoutEffect, useEffect, useCallback, useMemo, useContext, useDebugValue, useErrorBoundary, useId, };