Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeReact

useReadErrorReset

The reset handle of the nearest ReadErrorResetBoundary, or of the whole app without one. Signature, result and examples for useReadErrorReset.

Read hookstable
Since v1.0.0View source

The reset handle of the nearest ReadErrorResetBoundary, or of the whole app without one. Call reset from an error boundary's reset callback so useSuspenseRead reads again.

Signature

function useReadErrorReset(): ReadErrorReset

Examples

Resetting from a boundary component
import { useReadErrorReset } from "@ensforge/react"

export function RetryButton({ onRetry }: { onRetry: () => void }) {
  const { reset } = useReadErrorReset()
  return <button onClick={() => { reset(); onRetry() }}>Try again</button>
}

See also

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?