Skip to content

rename useErrorBoundary #4677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TkDodo opened this issue Dec 23, 2022 · 1 comment · Fixed by #4697
Closed

rename useErrorBoundary #4677

TkDodo opened this issue Dec 23, 2022 · 1 comment · Fixed by #4697
Assignees
Labels
Milestone

Comments

@TkDodo
Copy link
Collaborator

TkDodo commented Dec 23, 2022

context

A property that starts with the prefix use is unfortunately named, as use usually indicates a hook in React. ErrorBoundary might also be a quite react specific term.

Renaming the property to e.g. throwError would more accurately describe what is happening: the error will be thrown. In React, it will be picked up by the nearest error boundary.

proposal

  • rename useErrorBoundary to throwError
@Moshyfawn
Copy link
Contributor

Moshyfawn commented Dec 28, 2022

Should this issue be assigned to me then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants