RetryButtoncomponent

RetryButton({ children = RETRY_CHILDREN, ...props }: RetryButtonProps): ReactElement | null
ParamType
propsRetryButtonProps
Props for <RetryButton> — <Button> variants plus optional children to override the default "Retry" label. required
Return
ReactElement | null
The retry button, or null when not inside a <Catcher>.

Button that retries the nearest <Catcher> error boundary when clicked.

  • Reads the retry callback from <Catcher>'s private context, so it renders null when there is no boundary above it to retry.
  • Defaults to an "Retry" label with a refresh icon; pass children to override.

Examples

<RetryButton small />