UNPKG

foxact

Version:

React Hooks/Utils done right. For browser, SSR, and React Server Components.

8 lines (5 loc) 278 B
import * as react from 'react'; type ErrorLike = Error | undefined | null | boolean; /** @see https://foxact.skk.moe/use-error-boundary */ declare function useErrorBoundary(givenError?: ErrorLike): react.Dispatch<react.SetStateAction<ErrorLike>>; export { useErrorBoundary };