-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[TextField] dispatcher.useId
is not a function in React 18
#31190
Comments
Hi, this is an issue that I had as well. I know that it isn't a solution, but my Blitz.js setup worked when I downgraded to react and react-dom 17. Whatever the issue is, it has something to do with 18. |
dispatcher.useId
is not a function in React 18
Using |
@tom-richter Thanks, using |
I switched to "react": "18.0.0-beta-24dd07bd2-20211208" and "18.0.0-beta-24dd07bd2-20211208" - Works as well :) |
still an issue with react 18. is there an update? |
Closing this issue as it works with the latest React v18.2.0 |
I have this same issue on error - TypeError: dispatcher.useId is not a function Anyone knows what it is? |
@PrimozRome Please provide a CodeSandbox reproducing the issue. |
I have the same error when try to use the Modal component from 'antd' library. "react": "^18.2.0", |
I have managed to solve the issue. I only upgraded |
Issue is still peristant when testing mui5 components with enzyme in react18.2 and react-dom 18.2 |
I got the same error when using the "useId" hook in React Native. I have tried to solve the issue. I only change versions of React and React native both as below. After that, the error was gone! "react": "18.2.0", |
And what is your version of |
Updating react, react-dom and react-scripts to their latest version works: https://codesandbox.io/s/bold-shannon-53uc9j?file=/src/index.tsx I am closing the issue as no one created any reproduction. |
I got the same error with react@18.2.0 and solved it by upgrading react-dom to 18.2.0 |
* fix: dispatcher.useId is not a function Hopefully, mui/material-ui#31190 (comment) * refactor: ReactDOM.render deprecated Replace with createRoot * fix: createRoot import location
this solution worked for me |
Duplicates
Latest version
Current behavior 😯
When rendering the
<TextField />
component in a React 18 project (e.g. in BlitzJS), following error is shown:Expected behavior 🤔
The Textfield component renders without errors
Steps to reproduce 🕹
Example in this codesandbox
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Tested in Chrome and Firefox
The text was updated successfully, but these errors were encountered: