I am trying to set the error message in the state. I am using react hooks for storing error message. I don\'t know but it is not updating.
Here is my code,