-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: Add support for React 18 and useId #98
Conversation
} | ||
}, []) | ||
const setExpanded = useCallback( | ||
(n: boolean | ((prev: boolean) => boolean)) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real changes, just had to do this after bumping typings
Thanks for the PR, Dan! I'm still curious if we can find a way to continue to support React < v18. I see that MUI has created this solution for conditionally using |
Yeah, this seems alright! I'll leave it up to you how to handle this |
🎉 This PR is included in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Seems version 3.4.0 still has to have React 18. For folks that are still on 17, is the fallback support going to be released? Thanks! |
This reverts commit a392620.
The primary motivation is to replace the homegrown
useUniqueId()
with built-inuseId()
.I thought to do this conditionally so you can keep supporting older versions. But seems unfortunate to keep bundling that code and might be easier to break. Also, I don't know if it's valid for ESM bundlers to import an export that might not exist.
So I just upgraded the repo to 18 and bumped the peer deps.