Skip to content

useErrorResetBoundary only works once, subsequent resets are not caught in error boundary #1053

@matthewdavidson

Description

@matthewdavidson

Describe the bug
When using useErrorBoundaries in conjunction with useErrorResetBoundary, reset only works on first attempt.

Subsequent calls to reset fail to throw new errors (which means the error boundary doesn't catch it).

To Reproduce
https://codesandbox.io/s/confident-water-tn8sl

  1. notice error is caught in boundary
  2. click on "Try again"
  3. error is logged to console but no error boundary fallback is displayed

Expected behavior
Clicking on "Try again" should show the error boundary fallback every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions