Skip to content

Conversation

alowelter
Copy link

🐛 Fix: Remove defaultProps to eliminate React 18 warnings

Problem

React 18 shows deprecation warnings for defaultProps in functional components, as they will be removed in a future release.

Solution

  • Replace defaultProps with ES6 default parameters in function signatures
  • Maintain backward compatibility with existing API
  • No breaking changes

Files Changed

  • src/components/Tabs.js
  • src/components/TabList.js
  • src/components/Tab.js
  • src/components/TabPanel.js

Testing

  • All existing tests pass
  • No breaking changes to public API
  • Warnings eliminated in React 18

@alowelter alowelter closed this Aug 21, 2025
@alowelter alowelter reopened this Aug 21, 2025
@danez
Copy link
Collaborator

danez commented Aug 21, 2025

Thanks i quickly reviewed and looks good, i will check and merge once I'm back from vacation.

And also fix the CI which looks broken.

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.

3 participants