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.
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.