I have reproduced 3 components of my React App in the following codesandbox
As you can see in the demo, i have 3 react threejs components, rotating, moving and zooming with no issues.
The problem is in my local app with exactly the same code App.js
export default function App() {
return (
<FullScreenCanvas>
<OrbitControls enableZoom={true} enablePan={true} enableRotate={true} />
<Suspense fallback={null}>
<Thing />
<CircleLine linewidth={2} />
<Triangle color="#ff2060" scale={0.009} rotation={[0, 0, Math.PI / 3]} />
</Suspense>
</FullScreenCanvas>
)
}
This is the error i see in my console => Uncaught TypeError: Cannot read properties of undefined (reading 'data') at Line2.computeLineDistances
I have found out that the problem was caused by the react three fiber version, in fact if i downgraded in my app from "@react-three/fiber":` "^8.0.20", to the codesandbox demo "@react-three/fiber": "^7.0.24", the error disappeared and it works like in the demo. so my question is why i have this error with react/three/fiber 8.0.20

react-three-fiberyou'll need to havereactandreact-domto^18.1.0. Make sure you're running the latest versions, that might be it.