Skip to content
Advertisement

Tag: render

useState executing before another function

I am trying to setRes() as respond which is the result for a login request but Res is not setting This is the function: respond should return an object like this : or I tried console.log() for respond and the result is correct but the setRes(respond) is not working. Any ideas? The jsx: is this the correct way to authenticate?

Three.js + OrbitControls – Uncaught TypeError: Cannot read property ‘addEventListener’ of undefined

I am tryint to use OrbitControls in THREE.js. If I removed the line let cameraControl = new OrbitControls(camera) from below, there will be no error. But now, I have “Uncaught TypeError: Cannot read property ‘addEventListener’ of undefined” I tried to change OrbitControls(camera) to THREE.OrbitControls(camera), and then I had “Uncaught TypeError: THREE.OrbitControls is not a constructor”. I tried to import OrbitControls.js

Advertisement