mp-react-components icon indicating copy to clipboard operation
mp-react-components copied to clipboard

THREE.Scene: .dispose() has been removed.

Open JoshDLane opened this issue 2 years ago • 4 comments

Trying to use the CrystalToolkitScene component in react. Coming across this error: Screenshot 2023-05-10 at 10 47 58 PM

I also see there is an error in the storybooks for the CrystalToolkitScene component Cannot read properties of undefined (reading 'rotation').

Is there a version of this library where this component is stable that i should rollback too? or any other recommendations on how to get it working?

JoshDLane avatar May 11 '23 03:05 JoshDLane

Hi @JoshDLane, thanks for opening the issue. Which version are you using?

yang-ruoxi avatar May 16 '23 21:05 yang-ruoxi

Using: "@materialsproject/mp-react-components": "^0.3.0-SNAPSHOT.1683931142", "react": "^18.2.0", "react-dom": "^18.2.0"

its the same issue for the last few mp-react-components for as far as ive checked (0.1.12, 0.1.10)

The issue is resolved when i change back to using ReactDOM.render (react 17) instead of ReactDOM.createRoot

JoshDLane avatar May 17 '23 01:05 JoshDLane

another note @yang-ruoxi : I am using vite (https://vitejs.dev/guide/) in this project.

when i am trying to use this npm package in vanilla create react app I get this error below unless I use the exact react version I see used in mp-react-components (16.14). I get this error for all components, not just CrystalToolkitScene.

Screenshot 2023-05-17 at 1 36 02 PM

JoshDLane avatar May 17 '23 17:05 JoshDLane

thanks for the feedback! I'm not the original developer of this repo but will try to look into it as best as I can - maybe @codytodonnell has a better idea of the potential cause of this error?

yang-ruoxi avatar May 17 '23 19:05 yang-ruoxi