I have a problem on my react app with FireStore database.
Here is my state with a console.log
:
I have my documents.project array not empty but I have this error on my app :
I have a problem on my react app with FireStore database.
Here is my state with a console.log
:
I have my documents.project array not empty but I have this error on my app :
Your documents
variable is a array so you either need to loop through the array to get the index value and use it to access all the objects with project
property like:
for(var i=0; i<documents.length; i++){
console.log(documents[i].project);
}
Or you need to explicitly define the index value as documents[0].project
to get the project
value of object at index 0
and so on.