You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not an expert in React or this library, but the bug seems to be in this code. api.select calls a setState which causes the component to re-render calling the cleanup for the effect, which remove the object from the selection, and it's added back in when the effect reruns, etc.
Using selection API causes the child components stuck in endless loop
<Selection> <Select enabled> <mesh position={[5, 5, 0]}> <boxGeometry /> <meshStandardMaterial color="orange" /> </mesh> </Select> </Selection>