react Error: Objects are not valid as a React child (found: object with keys {username, password})

The reason for the error is that the user here is an object type data. In react, it is not allowed to directly display object data in the page.


Just change it to this. Show common data types such as strings or numbers

Read More: