Closed oseogbe closed 2 months ago
Calling the useShoppingCart hook in my Next.js 14 App Router throws the error shown below:
// app/layout.tsx
// components/AddToCart.tsx
Please how do I get around this?
https://stackoverflow.com/questions/75494844/useshoppingcart-typeerror-cannot-read-properties-of-undefined-reading-dispa
It worked, thanks.
Calling the useShoppingCart hook in my Next.js 14 App Router throws the error shown below:
// app/layout.tsx![Screenshot from 2024-06-21 18-48-39](https://github.com/dayhaysoos/use-shopping-cart/assets/36956517/23934fbc-fad8-4f66-a583-58f869a80657)
// components/AddToCart.tsx![Screenshot from 2024-06-21 18-49-06](https://github.com/dayhaysoos/use-shopping-cart/assets/36956517/596d560c-d34d-454a-af17-9b2af93fe50c)
Please how do I get around this?