When logging in with wrong login-details I would like to show the 401 error message from the server. How would this be possible? I am also a bit confused as the docs refer to an error that can be derived from the useAuth hook:
But when I look at the codesandbox example it is not used, but a useState hook on the onSubmit catched error is used. Could you maybe explain how this should work?
When logging in with wrong login-details I would like to show the 401 error message from the server. How would this be possible? I am also a bit confused as the docs refer to an
error
that can be derived from theuseAuth
hook:But when I look at the codesandbox example it is not used, but a
useState
hook on theonSubmit
catched error is used. Could you maybe explain how this should work?