Skip to content
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

Further obfuscate reference to React.useId #382

Merged
merged 2 commits into from
Aug 8, 2024
Merged

Conversation

nwidger
Copy link
Contributor

@nwidger nwidger commented Jul 31, 2024

Use technique from this comment: mui/material-ui#41190 (comment) to further obfuscate reference to React.useId which causes issue when using react-resizable-panels with React <18 and esbuild > 0.19.5.

Fixes #381

Use technique from this comment: mui/material-ui#41190 (comment) to further obfuscate reference to `React.useId` which causes issue when using `react-resizable-panels` with React <18 and `esbuild` > 0.19.5.

Fixes bvaughn#381
Copy link

vercel bot commented Jul 31, 2024

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

Name Status Preview Comments Updated (UTC)
react-resizable-panels ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 4:58pm

@nwidger
Copy link
Contributor Author

nwidger commented Aug 2, 2024

@bvaughn Any thoughts on the proposed changes?

@bvaughn
Copy link
Owner

bvaughn commented Aug 2, 2024

Hey @nwidger. Busy week for me (lots of interviews) so I hadn't looked at this yet.

Looks okay I guess. JS bundlers are weird. I wish there was a standard directive or something that we could use to opt out of this kind of "smart" optimization but 🤷🏼

There's a formatting issue that's causing CI to be unhappy. I left a comment.

Use formatting required by Prettier for this file.

Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
@nwidger
Copy link
Contributor Author

nwidger commented Aug 2, 2024

@bvaughn No worries at all! And thanks for the fix to (hopefully) make CI happy.

I totally agree, JS bundlers are weird. I was pretty surprised to learn that packages like this one that want to handle multiple versions of React but fallback gracefully if certain features aren't available are forced to do these sorts of things. But as you said, 🤷

@bvaughn
Copy link
Owner

bvaughn commented Aug 8, 2024

Sorry it's taking me a while to get back to this. Been a really busy few days on my side.

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.

export 'useId' was not found in 'react'
2 participants