Skip to content

Conversation

@stefanprobst
Copy link
Contributor

What: removed the updatedWithError class instance property, and replaced with checking prevState.error in componentDidUpdate.

Why: i have found the this.updatedWithError a bit confusing to follow, and afaict checking prevState.error wlil do the same since we only want to avoid resetting the error state in the same render cycle where we received the error. tests are still passing, but feel free to close if you think this doesn't add anything.

How:

Checklist:

  • Documentation N/A
  • Tests N/A (still passing)
  • Ready to be merged

also added eslint comment to disable sorting typescript union members, to keep the diff clear

Copy link
Collaborator

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a lot of thought and I think it's safe to merge and release as a non-breaking change. Hopefully the tests and I are not wrong 😅

@kentcdodds kentcdodds merged commit a0a370c into bvaughn:master Oct 29, 2021
@kentcdodds
Copy link
Collaborator

Thank you!

@github-actions
Copy link

🎉 This PR is included in version 3.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@stefanprobst
Copy link
Contributor Author

thanks! 🤞

@stefanprobst stefanprobst deleted the refactor/remove-class-instance-property branch October 29, 2021 06:01
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 this pull request may close these issues.

2 participants