Let's try debugging: Instead of fetching category[0].title, see if you can fetch category and either plant a debugger or log category to the console. We need to make sure the fetch is happening correctly, then check to see if the title key is present in the returned array object.
I suspect the problem is from the fetch in your hook, instead of in the assignment syntax afterward. Let me know what is returned from your API when you debug.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Ah, seen!
Let's try debugging: Instead of fetching category[0].title, see if you can fetch category and either plant a debugger or log category to the console. We need to make sure the fetch is happening correctly, then check to see if the title key is present in the returned array object.
I suspect the problem is from the fetch in your hook, instead of in the assignment syntax afterward. Let me know what is returned from your API when you debug.