Skip to content

composability & referential stability in useErrorBoundary#2882

Open
brainlessbadger wants to merge 1 commit into
preactjs:mainfrom
brainlessbadger:error-boundary-changes
Open

composability & referential stability in useErrorBoundary#2882
brainlessbadger wants to merge 1 commit into
preactjs:mainfrom
brainlessbadger:error-boundary-changes

Conversation

@brainlessbadger

Copy link
Copy Markdown

For your consideration, two changes to useErrorBoundary to bring it more in line with other hooks

  • ensure that useErrorBoundary can be called multiple times in the same component independently, like all other hooks do
  • ensure referential stability of the reset callback, like useState does

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 14a2604 on brainlessbadger:error-boundary-changes into e8a4c46 on preactjs:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants