utsuboco/r3f-perf

React 18 support

gregdingle opened this issue · 7 comments

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

The problem seems to be this line

ReactDOM.render(
.

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.

Sounds good. We've already patched our version of r3f-perf.

We could also submit a PR that is backwards compatible.

Oh, that would be awesome if you could PR patch.

updated r3f-perf@6.0.0 to v18 and r3f v8

Awesome!

Im still having this error with 6.0.1