-
Notifications
You must be signed in to change notification settings - Fork 46.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
Uncaught TypeError: this.updater.enqueueCallback is not a function when using setState callback #10320
Comments
From your stack trace it is visible that you have 15 of React package but 16 of ReactDOM. Can you try same versions please? |
@gaearon should we maybe fail early or at least warn if we detect a major version mismatch? |
Oh damn, shame on me. Indeed it was a version mismatch. |
Closing since there is no issue. We can discuss warning on version mismatch in a separate issue if you would like! |
I am having this issue since updating to react 16 with lots of packages. react-tooltip is one react-google-maps is another with my package.json showing:
|
Please run |
Cool, thanks Dan! |
So that did fix it. It was a module that is not actually included anywhere in my file anymore. May be worth adding something in the release notes to have the user run Removing that package seemed to fix all the issues instantly. |
For the record, I had this error from an Enzyme 3.0 adapter using a React 16 adapter, when my React version was 15. Changing adapters solved the issue. |
I am facing following issue can anybody help me out Uncaught TypeError: this.updater.enqueueCallback is not a function |
fixes version conflicts, e.g. I got an error Uncaught TypeError: this.updater.enqueueCallback is not a function when using setState callback because I use React 16.x and react-jsonschema-form bundled react-dom 15.x See facebook/react#10320 (comment)
fixes version conflicts, e.g. I got an error Uncaught TypeError: this.updater.enqueueCallback is not a function when using setState callback because I use React 16.x and react-jsonschema-form bundled react-dom 15.x See facebook/react#10320 (comment)
* react-dom is external peerDependency, just like react. fixes version conflicts, e.g. I got an error Uncaught TypeError: this.updater.enqueueCallback is not a function when using setState callback because I use React 16.x and react-jsonschema-form bundled react-dom 15.x See facebook/react#10320 (comment) * Fix for new submit() method (PR #1058) also submitting the HTML form ..., navigating away from current page at least in Firefox. Reason: dispatched event was not cancelable, so preventDefault in onSubmit couldn't cancel it. Links: * <https://stackoverflow.com/a/40916998> * <https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable> * Synchronous call to onSubmit() from props Due to the use of setImmediate() hack in setState utility function (utils.js), onSubmit() handler from props is called asynchronously. This leads to massive problems for operations requiring "trusted events", like window.open() or programmatically submitting forms with target "_blank" (which we needed) Because onSubmit() should not need the performance-related setImmiate() hack, I replaced call to setState utility function with proper this.setState() from React. * fix failing FileWidget tests by changing to proper use of setState() without setImmediate() hacks (see #1197) * fix input type, fix test name * Test with newer node versions * Add node 12
I have got the same error. My problem was the manual setting |
Do you want to request a feature or report a bug?
Bug on a beta version.
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).
In my Component, I used a pretty simple piece of code:
firing doSomething() causes this error.
What is the expected behavior?
I expect this.doSomeMore function to be called after this.setState from this.doSomething.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Version of React: 16.0.0-beta.2
I have tested several other versions and I can confirm that:
The text was updated successfully, but these errors were encountered: