React 18 support
gregdingle opened this issue · 7 comments
gregdingle commented
I'd like to use r3f-perf with the nearly released React 18. When I do, I get the warning
Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
gregdingle commented
The problem seems to be this line
r3f-perf/packages/r3f-perf/src/html.tsx
Line 65 in 6711a58
RenaudRohlinger commented
Since React 18 is still in RC and R3F is still in v7 let's wait for r3f to go v8 to use createRoot.
In the meantime, a patch would be easily possible depending on the version of React.
gregdingle commented
Sounds good. We've already patched our version of r3f-perf.
We could also submit a PR that is backwards compatible.
RenaudRohlinger commented
Oh, that would be awesome if you could PR patch.
RenaudRohlinger commented
updated r3f-perf@6.0.0 to v18 and r3f v8
gregdingle commented
Awesome!
DennisSmolek commented
Im still having this error with 6.0.1