Skip to content

Conversation

brycehanscomb
Copy link
Contributor

Smaller-scope reattempt of #534 that fixes the warning that latest versions of React give about using the now-deprecated defaultProps.

Description

Unlike #534 this PR does not do any refactoring of the class components into FCs etc.

*Note: since the default value of any missing prop is always undefined, the correct way to port these defaultProps is to simply remove them, i.e.:

class X extends React.Component {}
X.defaultProps = {
    className: undefined
}

// ... is the same as...

const X = ({ className = undefined }) {}

// ... is the same as ...

const X = ({ className }) {}

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • ✅ My code follows the code style of this project.
  • ✅ If my change requires a change to the documentation I have updated the documentation accordingly.

Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-super-responsive-table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 2:21am

Copy link
Owner

@coston coston left a comment

Choose a reason for hiding this comment

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

Thanks for the uncomplicated contribution, @brycehanscomb. 💯

@coston coston merged commit 8aee479 into coston:master Apr 10, 2024
Copy link

🎉 This PR is included in version 5.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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