Processing JSON array in React and getting Uncaught TypeError: data.find is not a function

QuestionsProcessing JSON array in React and getting Uncaught TypeError: data.find is not a function
sethbeckerman5 Staff asked 4 years ago

I'm learning React and making a very simple app, where I am getting info from github api and displaying my repos information. It doesn't work tho and I keep getting an error when I'm trying to find a particular

Uncaught TypeError: data.find is not a function

Here's my code (I deleted almost everything meaningful and left only the part where I'm trying to get at least one repository from the array):

That's what Getapiinfo function does (gets all the information about all my repos):

I'm not sure what I am missing, because is definitely an array. At least when I delete the find line, it all works as expected and gets an element by its index:

Can you help me with that? I've already spent too much time on this problem and I know it is something simple that I can't just notice. I've also looked through several topics here but none of them seem to have a correct answer or any answers at all 😀


View on Stack Overflow