I am learning about Hooks, React Context, and other things, but I feel that I don't understand how DevTools work. My axios call returns some data which updates the state. I can see the state change and my console.log displays the information.
This is state under Hooks:
This is what the console.log(todos)
spits out:
This is how console log looks expanded:
I don't know if the todos have the form of {[{_id, title, userId}]}
or [{_id, title, userId}]
under DevTools.
I think it is the latter and tried to access via console.log(todos[0])
, console.log(todos[0]['title'])
, etc but those return undefined
yet console.log(todos)
doesn't. Is there a reason why this is so?