Skip to content
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

react 19 + leva = error ReactDOM render is not a function #521

Open
chrisweb opened this issue Oct 22, 2024 · 4 comments
Open

react 19 + leva = error ReactDOM render is not a function #521

chrisweb opened this issue Oct 22, 2024 · 4 comments

Comments

@chrisweb
Copy link

chrisweb commented Oct 22, 2024

I was testing r3f v9 beta 1 with react 19 (which is included in the latest next.js 15 stable that got released a day ago), I then added leva to the mix, I however encountered the following error:

TypeError: react_dom__WEBPACK_IMPORTED_MODULE_0__.render is not a function

The error is in the vector-plugin file (in the render function): ReactDOM.render(element, container);

I have created a reproduction repository if you want to have a look at the error for yourself

I assume this error is related to changes in react 19

@sovetski
Copy link

sovetski commented Nov 1, 2024

Same here..

@jamesvclements
Copy link

@chrisweb @sovetski make sure you're rendering the panel as well
CleanShot 2024-11-08 at 14 57 26@2x

@chrisweb
Copy link
Author

chrisweb commented Nov 9, 2024

@jamesvclements thx for the suggestion, I have added <Leva /> for a quick test, but it made no difference: chrisweb/nextjs_three-fiber_reproduction@a0d0ddc

The example currently in the main branch is an attempt to reduce the amount of code to minimum, but I did more test that are not in the final commit, however none of them had any impact, I used a lot of the examples found here: https://sbcode.net/react-three-fiber/leva/

Btw the original example I used, and which demonstrates that using react three fiber v8 everything works perfectly well, is from the react-postprocessing documentation for hue/sat, and the original code is in their codesandbox example

@wilsonhou
Copy link

got this bug too^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants