-
Notifications
You must be signed in to change notification settings - Fork 671
Beta 0.30 bug: React 19 version mismatch - TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') #937
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
Comments
I did some testing rebuilding the lib against react 19 (which is rc at the moment if i am not wrong). At that time it starts working somewhat but i run into the nextjs problem of it not allowing global stylesheets from a package. @kodobrody if you lower the react version to 18 with nextjs in your package.json, does the whole app work as expected? I also cannot get it convinced to import the stylesheet explicitly. |
Can be fixed by correctly not bundling any react in the vite.config.mjs external option, like that: |
@kodobrody react 19 is being forced with nextjs 15 :) you can verify why it is a problem by finding __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner in the dist of the package in npm The reason why it breaks is because __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED were changed in react 19, which leads to a problem and react version mismatch, because __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED is undefined, and nextjs15 is using react 19 rc We actually also can just mark react-jsx-runtime also as external :) minimum / recommended for react18/19 therefore: helped at cal.com to also reduce bundle size from 20kb to 2kb :) |
released in 0.30.0-beta.2 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
To Reproduce
.valueOf()
to get numbers)OR
Steps to reproduce the behavior:
Expected behavior
It should render the component correctly
Screenshots

Library Version
0.30 beta 1
The text was updated successfully, but these errors were encountered: