-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[vite] Uncaught ReferenceError: useForkRef_default is not defined #26078
Comments
@Roy-Kid Please provide a minimal reproduction test case with the latest version. This would help a lot 👷 . |
@oliviertassinari Thanks for your help! I use vite(with react template) to generate the project and use its own dev server. Here is the main.jsx code:
and the
and then run the |
It looks like an issue with vite. Did you try using Material-UI v5 as well? |
I'm going to a meeting. After I'll try create-react-app and v5 when I get back. Thanks for your kindly help! |
@Roy-Kid You can switch, but I think that it would be better for us to make sure it works with Vite! It's popular: https://bestofjs.org/projects/vite. |
Hi, I am so glad to help the community. If you need anything, please say so. I need a lot of learning to contribute to the community |
@Roy-Kid Ok, I had a look. I could reproduce the issue with the latest versions (v5). It's an issue with the icons package. This fixes the issue: #21377 (comment). If you want to add a new /examples in our repo with vite, feel free too. |
Current Behavior 😯
I want to add an accordion. I try simpleDrawer in the example, but one error raises:
My code is:
and the component SimpleAccordion is directly copied from example: https://material-ui.com/zh/components/accordion/
I'm new to the frontend so I don't know what's going wrong.
Thanks in advance!
Expected Behavior 🤔
PS: I want to use the accordion in the Drawer, to implement the effect like this:
is it possible?
The text was updated successfully, but these errors were encountered: