materialsproject / mp-react-components

A suite of React components for the Materials Project, developed for use in Crystal Toolkit and the Materials Project public website.
https://materialsproject.github.io/mp-react-components/
17 stars 8 forks source link

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

Open JoshDLane opened 1 year ago

JoshDLane commented 1 year ago

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?

yang-ruoxi commented 1 year ago

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

JoshDLane commented 1 year ago

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 commented 1 year ago

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
yang-ruoxi commented 1 year ago

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?