Skip to content
Advertisement

Tag: use-state

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?

Advertisement