Skip to content
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

refactor(*): rename 'info' parameter to 'errorInfo' in onError and componentDidCatch #206

Closed

Conversation

sukvvon
Copy link
Contributor

@sukvvon sukvvon commented Nov 10, 2024

What:

  • renamed the second parameter of componentDidCatch and onError from info to errorInfo for clarity. updated the corresponding ErrorBoundarySharedProps type and related documentation.

Why:

image
  • this change aligns with the type definition in react’s index.d.ts, where the second parameter of componentDidCatch is already named errorInfo. the update ensures consistency and improves code clarity.

How:

  • the second parameter in both componentDidCatch and onError was renamed from info to errorInfo. the related ErrorBoundarySharedProps type was updated accordingly. additionally, the README.md was modified to reflect these changes.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

@sukvvon sukvvon changed the title refactor: rename 'info' parametor to 'errorInfo' in 'onError' and 'componentDidCatch' refactor(*): rename 'info' parametor to 'errorInfo' in 'onError' and 'componentDidCatch' Nov 10, 2024
@sukvvon sukvvon changed the title refactor(*): rename 'info' parametor to 'errorInfo' in 'onError' and 'componentDidCatch' refactor(*): rename 'info' parametor to 'errorInfo' in onError and componentDidCatch Nov 10, 2024
@sukvvon sukvvon force-pushed the refactor/rename-info-to-errorInfo branch from ac1db74 to 9dc7f46 Compare November 10, 2024 14:34
@sukvvon sukvvon force-pushed the refactor/rename-info-to-errorInfo branch from 9dc7f46 to eb1f7b7 Compare November 10, 2024 14:38
@sukvvon sukvvon changed the title refactor(*): rename 'info' parametor to 'errorInfo' in onError and componentDidCatch refactor(*): rename 'info' parameter to 'errorInfo' in onError and componentDidCatch Nov 13, 2024
@sukvvon
Copy link
Contributor Author

sukvvon commented Nov 19, 2024

@bvaughn could you review this pr? 🙇🏻‍♂️

@bvaughn
Copy link
Owner

bvaughn commented Nov 19, 2024

This change set seems pretty subjective. I prefer to avoid merging changes that are just a matter of preference. Thanks though :)

@bvaughn bvaughn closed this Nov 19, 2024
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