-
Notifications
You must be signed in to change notification settings - Fork 139
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
fix(EmptyState): added useId handling for older react version #6607
fix(EmptyState): added useId handling for older react version #6607
Conversation
DCO Assistant Lite bot All contributors have signed the DCO. |
✅ Deploy Preview for ibm-products-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-for-ibm-products ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
recheck I have read the DCO document and I hereby sign the DCO. |
I have read the DCO document and I hereby sign the DCO. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6607 +/- ##
==========================================
- Coverage 80.76% 80.75% -0.02%
==========================================
Files 395 396 +1
Lines 12884 12886 +2
Branches 4266 4267 +1
==========================================
Hits 10406 10406
- Misses 2478 2480 +2
|
Thanks for contributing this fix @sean-anderson-ibm! 🎉 These commits were merged yesterday into our release branch, see here. And then auto-merged back into |
Closes #6606
Fixes
useId
use in react 17 and below, due touseId
only being in react 18 and above. Falls back to previous method of id generation for react versions <18.What did you change?
I added a util function to change how
useId
works based on react version support and updated references to itHow did you test and verify your work?
I linked the build package to a repo using react 16, and verified the issue was no longer present.
I have read the DCO document and I hereby sign the DCO.