Because you set your schema with a name property. I would think you would need 2 use states and instead of calling res.data you should call res.user.name in your .then statement. Something along those lines
I would first try to receive the data then console .log it instead of using it right away to look at the shape of the data. If you error there fix your api call, then one step at a time figure out how to handle the data.
I dont get your point. maybe thats because I dont have any background in coding. what I study was: html, css, javascript and know react. so if you could explain your point in a easier way i would be grateful.
and about console, actually I did it and based on what I know it works ,
So that data you receive is an object with 2 properties id and name, there is also all that metadata but no big deal. When you receive the data you send it to a function. What i like to do is break up the data first rather than creating a complicated function.
For example take name and id and send the to separate functions. .then(res) => (namefunction(res.data.name), idfunction(res.data.id)
Then in those functions you put the data somewhere, store it ect.