Can't return object property when it is shown in the object
Answered
American black bear posted this in #help-forum
American black bearOP
I have a client component that posts data to an api onClick and awaits for response upon api request to update the State. I have done a console log of the 'post' object and it looks like the object is successfully set but when i logged the post.photo, it returns undefined even though we do have a photo in the post. Would you know what is the issue?
2 Replies
Pretty sure it is post.post.photo
Answer
American black bearOP
Thank you kind sir, you just saved me hours of endless troubleshooting