Skip to content

fix(useid): guard against useId not being exported#14153

Merged
kodiakhq[bot] merged 1 commit into
carbon-design-system:mainfrom
tay1orjones:fix-react-useid
Jul 7, 2023
Merged

fix(useid): guard against useId not being exported#14153
kodiakhq[bot] merged 1 commit into
carbon-design-system:mainfrom
tay1orjones:fix-react-useid

Conversation

@tay1orjones

Copy link
Copy Markdown
Member

We've gotten reports that after updating to v11.33.0, consumers using React React <v18 get compiler errors.

image

This is because the import of useId from React 18 is not guarded for lower versions of react that do not export that function.

Changelog

Changed

  • guard the usage of useId by not importing it directly

@tay1orjones tay1orjones requested a review from a team as a code owner July 7, 2023 16:54
@tay1orjones tay1orjones self-assigned this Jul 7, 2023
@tay1orjones tay1orjones added type: bug 🐛 severity: 1 https://ibm.biz/carbon-severity role: dev 🤖 labels Jul 7, 2023
@netlify

netlify Bot commented Jul 7, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit 651e303
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64a8435a3d206400082d2f73
😎 Deploy Preview https://deploy-preview-14153--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify

netlify Bot commented Jul 7, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 651e303
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64a8435add0e65000867998b
😎 Deploy Preview https://deploy-preview-14153--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tw15egan tw15egan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍 ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants