nss-day-cohort-46 / How-to-Ask-for-Help

0 stars 0 forks source link

Cannot Destructure property error #216

Closed AndreaMays closed 3 years ago

AndreaMays commented 3 years ago

Ticket MUST be completed before getting help from an instructor

Name: Drea N

Breakout Room: Drea Nichole

Have you searched the other issue tickets? If not, do that first.

REQUIRED Add Tags to Issue Ticket and Assign to Project Board

REQUIRED Describe your issue:

I'm not sure what this error is talking about or how fix it as the code looks similar to all of my other "UseContext" code.

REQUIRED Copy/paste any error messages that appear:

TypeError: Cannot destructure property 'deleteProduct' of 'Object(...)(...)' as it is undefined.

REQUIRED What have you googled? (You must have at least 3 links related to your issue)

REQUIRED: What have you tried? Tell us everything you have tried.

Talking through it with someone else. Googling.

REQUIRED: Copy/paste link TO THE FILE on your branch that you are having issues with

Your link: https://github.com/AndreaMays/Frontend-Capstone/blob/am-cstone-renderFormToDom/src/components/Users/UserMenuCard.js#L6

Code Snippet

PASTE YOUR CODE HERE BETWEEN THE BACKTICKS
jisie commented 3 years ago

@AndreaMays This error usually occurs when you haven't wrapped the provider component around the component that is trying to access the data: https://github.com/nashville-software-school/client-side-mastery/blob/master/book-4-nashville-kennels/chapters/LIST_USECONTEXT.md#wrap-the-animallist-with-data