Skip to content

Tag: use-context

react context is giving undefined object

In my react application I am trying to use context api. In my component I am importing the context but it is giving error that object can not destructure the property. I am trying to implement cart functionality in my app. I am using hooks. ImgContext.js ImageGrid.js Answer You are not providing a a default v…