react-xr icon indicating copy to clipboard operation
react-xr copied to clipboard

Encountered two children with the same key when load controllers with <XR/> in Next.js

Open liyan827 opened this issue 1 year ago • 0 comments

My Project structure:Next.js13+React18+@react-three-xr:5.4.1 My usage is as follows: <VRButton /> <Canvas gl={{preserveDrawingBuffer: true}} {...props} onCreated={(state)=>{ state.gl.setClearColor(0xebf2f7); state.gl.localClippingEnabled = true; }}> <XR> <directionalLight intensity={0.75} /> <ambientLight intensity={0.75} /> {children} <Preload all /> <Controllers /> </XR> </Canvas> Here is the error: image What could be the reason for this? Is it because React is re-rendering?thanks for the reply

liyan827 avatar Apr 25 '23 08:04 liyan827